RPass serializer to queue at cli (#1556)

main
Josh Cohen 3 years ago committed by GitHub
parent a3fba1ca1f
commit 0d69d08126
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -100,16 +100,18 @@ def main():
@click.option('--all', '-a', is_flag=True, help='Empty all queues') @click.option('--all', '-a', is_flag=True, help='Empty all queues')
@click.argument('queues', nargs=-1) @click.argument('queues', nargs=-1)
@pass_cli_config @pass_cli_config
def empty(cli_config, all, queues, **options): def empty(cli_config, all, queues, serializer, **options):
"""Empty given queues.""" """Empty given queues."""
if all: if all:
queues = cli_config.queue_class.all(connection=cli_config.connection, 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: else:
queues = [cli_config.queue_class(queue, queues = [cli_config.queue_class(queue,
connection=cli_config.connection, connection=cli_config.connection,
job_class=cli_config.job_class) job_class=cli_config.job_class,
serializer=serializer)
for queue in queues] for queue in queues]
if not queues: if not queues:
@ -249,7 +251,8 @@ def worker(cli_config, burst, logging_level, name, results_ttl,
queues = [cli_config.queue_class(queue, queues = [cli_config.queue_class(queue,
connection=cli_config.connection, connection=cli_config.connection,
job_class=cli_config.job_class) job_class=cli_config.job_class,
serializer=serializer)
for queue in queues] for queue in queues]
worker = cli_config.worker_class( worker = cli_config.worker_class(
queues, name=name, connection=cli_config.connection, queues, name=name, connection=cli_config.connection,

@ -2,4 +2,4 @@
from __future__ import (absolute_import, division, print_function, from __future__ import (absolute_import, division, print_function,
unicode_literals) unicode_literals)
VERSION = '1.10.0' VERSION = '1.10.1'

Loading…
Cancel
Save