Am 23.03.2011 um 19:57 schrieb davidjagoe:
G'day all, I'm using tgscheduler with Turbogears 2. It works fine in my development environment but when deployed under apache + mod_wsgi I see all scheduled tasks running multiple times. In fact I even see the startup message multiple times. This is how I am hooking it up (as per the tutorial/docs with tgscheduler): # In app_cfg.py from cron import schedule base_config.call_on_startup = [schedule] Is it because this code is imported by multiple python processes when running under mod_wsgi? Can anyone suggest a way around this (I am currently considering a rather in-elegant file lock!)
I don't think a file-lock is unelegant by itself. But maybe a better solution would be a DB-based Task-Queue, which then the various scheduled workers grab their tasks from (proper locking is needed their as well of course)
Diez -- You received this message because you are subscribed to the Google Groups "TurboGears" group. To post to this group, send email to turbogears@googlegroups.com. To unsubscribe from this group, send email to turbogears+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/turbogears?hl=en.