Hi there,

I would like to have your feedback on the way I am running daemon scripts
for my Django/ Python app. I know this is definitely not the "one best way",
but this is a solution I came up with that seemed simple to implement. (I am
a real newbie!)

My constraints:
 - getting a few processs constantly repeating themselves
 - getting an email notification if one of the process crashes

I set up a cron job that is launching a "daemon manager" script every
minute. This script is querying a PostGreSQL database to retrieve boolean
values associated to the state of my background processes (running / not
running).  If the database indicates the process is not running, then the
cron script launches it.

Boolean values are updated by each process when it starts and finishes.
Currently, it seems to work fine - but my background processes are very
quick to execute. When my user base will grow, they may last longer and it
will be essential that background processes do not run concurrently.

Would that solution work? I was worried by potential caching issues with the
database that may prevent my cron script to retrieve the latest boolean
value. Is there any real risk?


Thanks for your feedback!

--~--~---------~--~----~------------~-------~--~----~
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 
django-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to