> Hi, > > I'm writing a Django application and want to use some extra facilities of > uWSGI. > > 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. > > is there some way to restrict the signal to be registered only once? >
Put it in wsgi.py or place in a dedicated file you can import with --shared-pyimport file -- Roberto De Ioris http://unbit.com _______________________________________________ uWSGI mailing list [email protected] http://lists.unbit.it/cgi-bin/mailman/listinfo/uwsgi
