Skip to content

Commit

Permalink
Merge PR #589 into 16.0
Browse files Browse the repository at this point in the history
Signed-off-by guewen
  • Loading branch information
OCA-git-bot committed Nov 23, 2023
2 parents 1ab7b4c + 642d286 commit 4a99cb8
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion queue_job/jobrunner/runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -398,10 +398,16 @@ def from_environ_or_config(cls):
return runner

def get_db_names(self):
"""
>>> runner = QueueJobRunner()
>>> config["db_name"] = None
>>> runner.get_db_names()
['odoo']
"""
if config["db_name"]:
db_names = config["db_name"].split(",")
else:
db_names = odoo.service.db.exp_list(True)
db_names = odoo.service.db.list_dbs(True)
return db_names

def close_databases(self, remove_jobs=True):
Expand Down

0 comments on commit 4a99cb8

Please sign in to comment.