[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:
Don Kirkby
2010-12-23 12:28:24 +01:00
committed by Olivier Dony
parent 6aa3a560f7
commit 0eaa680c1f
+1 -1
View File
@@ -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'))