support comma-separated queue lists for backward compatability (spaces are still supported) (#4937)

This commit is contained in:
Omer Lachish 2020-06-03 15:13:52 +03:00 committed by GitHub
parent 100c7be5e0
commit d38d3b6b4d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -2,6 +2,7 @@ from __future__ import absolute_import
import socket
import sys
import datetime
from itertools import chain
from click import argument
from flask.cli import AppGroup
@ -40,6 +41,8 @@ def worker(queues):
if not queues:
queues = default_queues
else:
queues = chain(*[queue.split(",") for queue in queues])
with Connection(rq_redis_connection):
w = Worker(queues, log_job_description=False, job_monitoring_interval=5)