Beispiel #1
0
def start_celery(ctx, show_help, show_celery_help, celery_args):
    """Preconfigured wrapper around the 'celery' command.
    Additional CELERY_ARGS arguments are passed to celery."""
    if show_help:
        click.echo(ctx.get_help())
        sys.exit(0)

    if show_celery_help:
        click.echo(celery.start(argv=["--help"]))
        sys.exit(0)

    default_args = ['celery']
    default_args = default_args + list(celery_args)
    celery.start(argv=default_args)
Beispiel #2
0
def start_celery(ctx, show_help, show_celery_help, celery_args):
    """Preconfigured wrapper around the 'celery' command.
    Additional CELERY_ARGS arguments are passed to celery."""
    if show_help:
        click.echo(ctx.get_help())
        sys.exit(0)

    if show_celery_help:
        click.echo(celery.start(argv=["--help"]))
        sys.exit(0)

    default_args = ['celery']
    default_args = default_args + list(celery_args)
    celery.start(argv=default_args)
Beispiel #3
0
def start_celery(ctx):
    """Preconfigured wrapper around the 'celery' command."""
    celery.start(ctx.args)