Skip to content

Commit

Permalink
[FIX] ignore dbfilter, fixes OCA#58
Browse files Browse the repository at this point in the history
  • Loading branch information
sbidoul authored and nguyenminhchien committed Nov 24, 2023
1 parent 866d565 commit 58f66d9
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 13 deletions.
4 changes: 0 additions & 4 deletions queue_job/jobrunner/runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,6 @@
from contextlib import closing
import logging
import os
import re
import select
import threading
import time
Expand Down Expand Up @@ -266,9 +265,6 @@ def get_db_names(self):
db_names = openerp.tools.config['db_name'].split(',')
else:
db_names = openerp.service.db.exp_list(True)
dbfilter = openerp.tools.config['dbfilter']
if dbfilter and '%d' not in dbfilter and '%h' not in dbfilter:
db_names = [d for d in db_names if re.match(dbfilter, d)]
return db_names

def close_databases(self, remove_jobs=True):
Expand Down
10 changes: 1 addition & 9 deletions queue_job/queue/worker.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
#
##############################################################################

import re
import logging
import os
import threading
Expand Down Expand Up @@ -260,14 +259,7 @@ def available_db_names():
if config['db_name']:
db_names = config['db_name'].split(',')
else:
services = openerp.netsvc.ExportService._services
if services.get('db'):
db_names = services['db'].exp_list(True)
else:
db_names = []
dbfilter = config['dbfilter']
if dbfilter and '%d' not in dbfilter and '%h' not in dbfilter:
db_names = [d for d in db_names if re.match(dbfilter, d)]
db_names = db.exp_list(True)
available_db_names = []
for db_name in db_names:
session_hdl = ConnectorSessionHandler(db_name,
Expand Down

0 comments on commit 58f66d9

Please sign in to comment.