[FIX] Fixed bug in crons that made the crons to launch in the current thread

each time the ir.cron table was modified.

bzr revid: nicolas.vanhoren@openerp.com-20101119093812-dq14n1qaxd0kz750
This commit is contained in:
nvi-openerp
2010-11-19 10:38:12 +01:00
parent d61adb56be
commit f434e3c4d3
+2 -1
View File
@@ -145,7 +145,8 @@ class ir_cron(osv.osv, netsvc.Agent):
def restart(self, dbname):
self.cancel(dbname)
self._poolJobs(dbname)
# Reschedule cron processing job asap, but not in the current thread
self.setAlarm(self._poolJobs, time.time(), dbname, dbname)
def create(self, cr, uid, vals, context=None):
res = super(ir_cron, self).create(cr, uid, vals, context=context)