refactor(queueworker): remove unused function and import
Remove `_close_db_handle` method from `QueueWorker` class. Nowhere calls this method, so it is safe to remove. This function was the only place using the `db` imported from `data.model`, so we can remove that import as well. Testing: need to look into it
This commit is contained in:
parent
a3afd37c41
commit
6e2fad2b9c
1 changed files with 0 additions and 6 deletions
|
@ -4,7 +4,6 @@ import json
|
|||
from threading import Event, Lock
|
||||
|
||||
from app import app
|
||||
from data.model import db
|
||||
from data.database import CloseForLongOperation
|
||||
from workers.worker import Worker
|
||||
|
||||
|
@ -57,11 +56,6 @@ class QueueWorker(Worker):
|
|||
""" Function that gets run once every watchdog_period_seconds. """
|
||||
pass
|
||||
|
||||
def _close_db_handle(self):
|
||||
if not db.is_closed():
|
||||
logger.debug('Disconnecting from database.')
|
||||
db.close()
|
||||
|
||||
def extend_processing(self, seconds_from_now, updated_data=None):
|
||||
with self._current_item_lock:
|
||||
if self.current_queue_item is not None:
|
||||
|
|
Reference in a new issue