diff --git a/application/cmd/cre_main.py b/application/cmd/cre_main.py index f9287953..968d1c4f 100644 --- a/application/cmd/cre_main.py +++ b/application/cmd/cre_main.py @@ -643,7 +643,7 @@ def run(args: argparse.Namespace) -> None: # pragma: no cover if args.start_worker: from application.worker import start_worker - start_worker(args.cache_file) + start_worker() if args.preload_map_analysis_target_url: gap_analysis.preload(target_url=args.preload_map_analysis_target_url) diff --git a/application/tests/cre_main_test.py b/application/tests/cre_main_test.py index 1912f04e..46270fb5 100644 --- a/application/tests/cre_main_test.py +++ b/application/tests/cre_main_test.py @@ -367,7 +367,7 @@ def test_parse_file(self) -> None: "objects", "here", { - 1: 2, + "1": 2, }, ], scollection=self.collection, diff --git a/application/worker.py b/application/worker.py index 104e05eb..76b2057b 100644 --- a/application/worker.py +++ b/application/worker.py @@ -1,9 +1,5 @@ -import os -import redis from rq import Worker, Queue, Connection -from application.database import db import logging -from application.cmd.cre_main import db_connect from application.utils import redis logging.basicConfig() @@ -12,11 +8,8 @@ listen = ["high", "default", "low"] - -def start_worker(cache: str): - conn = redis.connect() +def start_worker(): logger.info(f"Worker Starting") - database = db_connect(path=cache) - with Connection(conn): + with Connection(redis.connect()): worker = Worker(map(Queue, listen)) worker.work()