I'm trying to setup django development server using ubuntu 12.04
(packaged uWSGI 1.2.4-debian) and I can't get @timer decorator to work
using code:
import uwsgi
from uwsgidecorators import timer, cron
from django.utils import autoreload
@timer(2)
def change_code_gracefull_reload(sig):
print("uwsgi timer")
if autoreload.code_changed():
print("Code change detected, reloading workers")
uwsgi.reload()
@cron(-1, -1, -1, -1, -1)
def clear_django_session(num):
print("cleared")
App logs show:
Thu Oct 4 14:35:02 2012 - [uwsgi-signal] signum 0 registered (wid: 1
modifier1: 0 target: default, any worker)
Thu Oct 4 14:35:02 2012 - [uwsgi-signal] signum 1 registered (wid: 1
modifier1: 0 target: default, any worker)
cron works as expected, but timer doesn seem to fire even once. Any tips?
--
Łukasz Mierzwa
_______________________________________________
uWSGI mailing list
[email protected]
http://lists.unbit.it/cgi-bin/mailman/listinfo/uwsgi