Skip to content

Commit

Permalink
remove use of deprecated rq.Connection after upgrade
Browse files Browse the repository at this point in the history
  • Loading branch information
northdpole committed Feb 18, 2025
1 parent ba01daf commit f87bc00
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions application/worker.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from rq import Worker, Queue, Connection
from rq import Worker, Queue
import logging
from application.utils import redis

Expand All @@ -8,9 +8,7 @@

listen = ["high", "default", "low"]


def start_worker():
logger.info(f"Worker Starting")
with Connection(redis.connect()):
worker = Worker(map(Queue, listen))
worker.work()
worker = Worker(listen,connection=redis.connect())
worker.work()

0 comments on commit f87bc00

Please sign in to comment.