mirror of https://github.com/rq/rq.git
RPass serializer to queue at cli (#1556)
This commit is contained in:
parent
a3fba1ca1f
commit
0d69d08126
|
@ -100,16 +100,18 @@ def main():
|
|||
@click.option('--all', '-a', is_flag=True, help='Empty all queues')
|
||||
@click.argument('queues', nargs=-1)
|
||||
@pass_cli_config
|
||||
def empty(cli_config, all, queues, **options):
|
||||
def empty(cli_config, all, queues, serializer, **options):
|
||||
"""Empty given queues."""
|
||||
|
||||
if all:
|
||||
queues = cli_config.queue_class.all(connection=cli_config.connection,
|
||||
job_class=cli_config.job_class)
|
||||
job_class=cli_config.job_class,
|
||||
serializer=serializer)
|
||||
else:
|
||||
queues = [cli_config.queue_class(queue,
|
||||
connection=cli_config.connection,
|
||||
job_class=cli_config.job_class)
|
||||
job_class=cli_config.job_class,
|
||||
serializer=serializer)
|
||||
for queue in queues]
|
||||
|
||||
if not queues:
|
||||
|
@ -249,7 +251,8 @@ def worker(cli_config, burst, logging_level, name, results_ttl,
|
|||
|
||||
queues = [cli_config.queue_class(queue,
|
||||
connection=cli_config.connection,
|
||||
job_class=cli_config.job_class)
|
||||
job_class=cli_config.job_class,
|
||||
serializer=serializer)
|
||||
for queue in queues]
|
||||
worker = cli_config.worker_class(
|
||||
queues, name=name, connection=cli_config.connection,
|
||||
|
|
|
@ -2,4 +2,4 @@
|
|||
from __future__ import (absolute_import, division, print_function,
|
||||
unicode_literals)
|
||||
|
||||
VERSION = '1.10.0'
|
||||
VERSION = '1.10.1'
|
||||
|
|
Loading…
Reference in New Issue