projects
/
odoo
/
odoo.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge commit 'origin/master' into mdv-gpl3-py26
[odoo/odoo.git]
/
bin
/
addons
/
base
/
ir
/
ir_cron.py
diff --git
a/bin/addons/base/ir/ir_cron.py
b/bin/addons/base/ir/ir_cron.py
index
d286781
..
8076ce4
100644
(file)
--- a/
bin/addons/base/ir/ir_cron.py
+++ b/
bin/addons/base/ir/ir_cron.py
@@
-75,13
+75,18
@@
class ir_cron(osv.osv, netsvc.Agent):
f(cr, uid, *args)
def _poolJobs(self, db_name, check=False):
f(cr, uid, *args)
def _poolJobs(self, db_name, check=False):
- now = DateTime.now()
- #FIXME: multidb. Solution: a l'instanciation d'une nouvelle connection bd (ds pooler) fo que j'instancie
- # un nouveau pooljob avec comme parametre la bd
try:
try:
- cr = pooler.get_db(db_name).cursor()
+ db, pool = pooler.get_db_and_pool(db_name)
+ if pool._init:
+ # retry in a few minutes
+ self.setAlarm(self._poolJobs, int(time.time())+10*60, [db_name])
+ cr = db.cursor()
except:
return False
except:
return False
+
+ now = DateTime.now()
+ #FIXME: multidb. Solution: a l'instanciation d'une nouvelle connection bd (ds pooler) fo que j'instancie
+ # un nouveau pooljob avec comme parametre la bd
try:
cr.execute('select * from ir_cron where numbercall<>0 and active and nextcall<=now() order by priority')
try:
cr.execute('select * from ir_cron where numbercall<>0 and active and nextcall<=now() order by priority')