[FIX] modifying a cron from client make it run concurrently multiple times
bzr revid: jvo@tinyerp.com-20100514085525-op7lvavl8aq6lakz
This commit is contained in:
@@ -146,16 +146,19 @@ class ir_cron(osv.osv, netsvc.Agent):
|
||||
def create(self, cr, uid, vals, context=None):
|
||||
res = super(ir_cron, self).create(cr, uid, vals, context=context)
|
||||
cr.commit()
|
||||
self.cancel(cr.dbname)
|
||||
self._poolJobs(cr.dbname)
|
||||
return res
|
||||
def write(self, cr, user, ids, vals, context=None):
|
||||
res = super(ir_cron, self).write(cr, user, ids, vals, context=context)
|
||||
cr.commit()
|
||||
self.cancel(cr.dbname)
|
||||
self._poolJobs(cr.dbname)
|
||||
return res
|
||||
def unlink(self, cr, uid, ids, context=None):
|
||||
res = super(ir_cron, self).unlink(cr, uid, ids, context=context)
|
||||
cr.commit()
|
||||
self.cancel(cr.dbname)
|
||||
self._poolJobs(cr.dbname)
|
||||
return res
|
||||
ir_cron()
|
||||
|
||||
Reference in New Issue
Block a user