Skip to content

Commit

Permalink
chore: refactor for rq 2.x (frappe#30935)
Browse files Browse the repository at this point in the history
There's no `Connection` anymore - we need to explicitly pass it in everywhere

Signed-off-by: Akhil Narang <[email protected]>
  • Loading branch information
akhilnarang authored Jan 30, 2025
2 parents 22560c3 + d7c3553 commit 0612c01
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions frappe/utils/doctor.py
Original file line number Diff line number Diff line change
@@ -1,15 +1,14 @@
from collections import defaultdict

from rq import Connection, Worker
from rq import Worker

import frappe.utils
from frappe.utils.background_jobs import get_queue, get_queue_list, get_redis_conn
from frappe.utils.scheduler import is_scheduler_disabled, is_scheduler_inactive


def get_workers():
with Connection(get_redis_conn()):
return Worker.all()
return Worker.all(connection=get_redis_conn())


def purge_pending_jobs(event=None, site=None, queue=None):
Expand Down

0 comments on commit 0612c01

Please sign in to comment.