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 thienvh332 committed Oct 7, 2024
1 parent a8884ac commit dcdc2a5
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 dcdc2a5

Please sign in to comment.