python - Running rbtimer from emperor -
I have a web application managed by a monarch and two separate vassals. Because they both write in different data sources, I need to synchronize both a file and that's why I decided to add a timer job to my emperor. To:
[ uwsgi] strict = true die -on-term = true memory-report = true uid = www-data gid = www-data emperor = xxx.ini logdate = true import = synchronize and It is synchronized .i : import from uwsgidecorators import rbtimer, lock INTERVAL = 10 @lock @rbtimer (INTERVAL) def synchronize (): "" "synchronizes data between Redis and PostgreSQL Land. " "Print 'aaa' I run my emperor in this way: uwsgi --ini emperor.ini But nothing happens, the console 'AAA' 'Never print. What else am I missing?
You need a process (a worker or mule)) A worker to run the signal handler (Adding socket directive) or adding a mule (twisted = true) In case of mule you need to add target = mules to @ rbtimer decorator)
Comments
Post a Comment