Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add remaining CLI args for flask rq worker. #122

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions src/flask_rq2/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -131,10 +131,17 @@ def info(rq, ctx, path, interval, raw, only_queues, only_workers, by_queue,
@click.option('--pid',
help='Write the process ID number to a file at '
'the specified path')
@click.option('--disable-default-exception-handler', '-d', is_flag=True,
help='Disable RQ\'s default exception handler')
@click.option('--max-jobs', type=int, default=None,
help='Maximum number of jobs to execute')
@click.option('--with-scheduler', '-s', is_flag=True,
help='Run worker with scheduler')
@click.argument('queues', nargs=-1)
@rq_command()
def worker(rq, ctx, burst, logging_level, name, path, results_ttl,
worker_ttl, verbose, quiet, sentry_dsn, exception_handler, pid,
disable_default_exception_handler, max_jobs, with_scheduler,
queues):
"Starts an RQ worker."
ctx.invoke(
Expand All @@ -150,6 +157,9 @@ def worker(rq, ctx, burst, logging_level, name, path, results_ttl,
sentry_dsn=sentry_dsn,
exception_handler=exception_handler or rq._exception_handlers,
pid=pid,
disable_default_exception_handler=disable_default_exception_handler,
max_jobs=max_jobs,
with_scheduler=with_scheduler,
queues=queues or rq.queues,
**shared_options(rq)
)
Expand Down