Skip to content

Commit 2c3a17c

Browse files
committed
makes queue name configurable for rqscheduler
1 parent 356827b commit 2c3a17c

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

django_rq/management/commands/rqscheduler.py

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,16 @@ class Command(BaseCommand):
1919
help="How often the scheduler checks for new jobs to add to the "
2020
"queue (in seconds).",
2121
),
22+
make_option(
23+
'--queue',
24+
type=str,
25+
dest='queue',
26+
default='default',
27+
help="Name of the queue used for scheduling.",
28+
),
2229
)
2330

24-
def handle(self, queue='default', *args, **options):
25-
scheduler = get_scheduler(name=queue, interval=options.get('interval'))
31+
def handle(self, *args, **options):
32+
scheduler = get_scheduler(
33+
name=options.get('queue'), interval=options.get('interval'))
2634
scheduler.run()

0 commit comments

Comments
 (0)