chore: refactor for rq 2.x (#30935)
There's no `Connection` anymore - we need to explicitly pass it in everywhere Signed-off-by: Akhil Narang <me@akhilnarang.dev>
This commit is contained in:
commit
0612c011dc
1 changed files with 2 additions and 3 deletions
|
|
@ -1,6 +1,6 @@
|
|||
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
|
||||
|
|
@ -8,8 +8,7 @@ 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):
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue