Hi,
I'd like to use the @timer decorator to periodically execute some > "offline" processes, like scanning a directory and adding to a > database. But if I include the file that defines this function from > my models.py, it's defined once on each worker process, and the timer > signal is emitted several times. > > This does not exactly solve your problem, but could provide some tools. I have found Advanced Python Scheduler to be very opinion free library of doing scheduled code in Python applications and works well with all kind of deployments. http://apscheduler.readthedocs.org/ APS can run inside a single process as threaded, or separately in an external process with various backends to store tasks (like in-process memory). Cheers, Mikko
_______________________________________________ uWSGI mailing list [email protected] http://lists.unbit.it/cgi-bin/mailman/listinfo/uwsgi
