KERNEL: fix ir.cron must start only once instance when server run with update args
bzr revid: ced-bd7423814d9f1526baa475e379e897de732dd768
This commit is contained in:
parent
f94600c862
commit
feddc3e6e7
|
@ -162,11 +162,7 @@ class Agent(object):
|
|||
def setAlarm(self, fn, dt, args=[], kwargs={}):
|
||||
wait = dt - time.time()
|
||||
if wait > 0:
|
||||
self._logger.notifyChannel(
|
||||
'timers', LOG_DEBUG,
|
||||
"Job scheduled in %s seconds for %s.%s" % (wait,
|
||||
fn.im_class.__name__,
|
||||
fn.func_name))
|
||||
self._logger.notifyChannel('timers', LOG_DEBUG, "Job scheduled in %s seconds for %s.%s" % (wait, fn.im_class.__name__, fn.func_name))
|
||||
timer = threading.Timer(wait, fn, args, kwargs)
|
||||
timer.start()
|
||||
self._timers.append(timer)
|
||||
|
|
|
@ -53,8 +53,7 @@ def get_db_and_pool(db_name, force_demo=False, status={}, update_module=False):
|
|||
if not update_module:
|
||||
import report
|
||||
report.interface.register_all(db)
|
||||
|
||||
pool.get('ir.cron')._poolJobs(db.dbname)
|
||||
pool.get('ir.cron')._poolJobs(db.dbname)
|
||||
return db, pool
|
||||
|
||||
def restart_pool(db_name, force_demo=False, update_module=False):
|
||||
|
|
Loading…
Reference in New Issue