Skip to content

Commit f0da3f7

Browse files
committed
If we can't initialize the db, continue to the next one
This should not indeed be considered as an error, and prevent issue in case of multiple databases with a mix between odoo and non odoo ones
1 parent 6f88b31 commit f0da3f7

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

queue_job/jobrunner/runner.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -433,7 +433,11 @@ def close_databases(self, remove_jobs=True):
433433
def initialize_databases(self):
434434
for db_name in sorted(self.get_db_names()):
435435
# sorting is important to avoid deadlocks in acquiring the master lock
436-
db = Database(db_name)
436+
try:
437+
db = Database(db_name)
438+
except Exception as e:
439+
_logger.warning(e)
440+
continue
437441
if db.has_queue_job:
438442
self.db_by_name[db_name] = db
439443
with db.select_jobs("state in %s", (NOT_DONE,)) as cr:

0 commit comments

Comments
 (0)