Hi kopikopiko,

I thought I'd chime in on how I'm solving a similar problem. I also
have a task scheduling app written in Django, but I actually run the
tasks through Django rather than outside of it: I have a special view
(/tasks/trigger) which remembers the last time the view ran and checks
for any tasks that should have run since the last trigger time. It then
simply loads and runs each task in sequence.

Outside of Django I have a schedule NT/Windows task that runs every 5
minutes and just does an HTTP get of the trigger view url.

I can get away with this since my tasks are simple and usually take a
few seconds to run so I don't mind running them synchronously. I did
think about your approach, though, and I was going to load all the DB
data that defines the task, then fire off the task on a background
thread, then have those tasks update the DB with their stats directly
(each making their own MySQL connection and doing direct SQL). I was
going to do it that way since I didn't want my task scripts to be
dependent on Django's ORM.

But like I said, I never went down the multi-threaded route because I
wanted to keep it simple and at this point, I don't need to.
-Dave


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users
-~----------~----~----~----~------~----~------~--~---

Reply via email to