[IMP] workers cron logging and chorus

bzr revid: al@openerp.com-20121209204544-7w98xboxh6uytz43
This commit is contained in:
Antony Lesuisse 2012-12-09 21:45:44 +01:00
parent 099ae0f70c
commit 97ab217893
1 changed files with 3 additions and 1 deletions

View File

@ -346,9 +346,11 @@ class WorkerBaseWSGIServer(werkzeug.serving.BaseWSGIServer):
class WorkerCron(Worker):
""" Cron workers """
def sleep(self):
time.sleep(60)
interval = 60 + self.pid % 10 # chorus effect
time.sleep(interval)
def process_work(self):
_logger.debug("WorkerCron (%s) polling for jobs", self.pid)
if config['db_name']:
db_names = config['db_name'].split(',')
else: