[FIX] ir.cron: always reschedule tasks even when one of them takes too long (courtesy of Don Kirkby)
lp bug: https://launchpad.net/bugs/677257 fixed bzr revid: odo@openerp.com-20101223112824-uvqpfn31g1va3yce
This commit is contained in:
@@ -124,7 +124,7 @@ class ir_cron(osv.osv, netsvc.Agent):
|
||||
cr.commit()
|
||||
|
||||
|
||||
cr.execute('select min(nextcall) as min_next_call from ir_cron where numbercall<>0 and active and nextcall>=now()')
|
||||
cr.execute('select min(nextcall) as min_next_call from ir_cron where numbercall<>0 and active')
|
||||
next_call = cr.dictfetchone()['min_next_call']
|
||||
if next_call:
|
||||
next_call = time.mktime(time.strptime(next_call, '%Y-%m-%d %H:%M:%S'))
|
||||
|
||||
Reference in New Issue
Block a user