@flaskbb.command('celery', context_settings=dict(ignore_unknown_options=True))
@click.argument('celery_args', nargs=(-1), type=click.UNPROCESSED)
@click.option('show_help', '--help', '-h', is_flag=True, help='Shows this message and exits')
@click.option('show_celery_help', '--help-celery', is_flag=True, help='Shows the celery help message')
@click.pass_context
@with_appcontext
def start_celery(ctx, show_help, show_celery_help, celery_args):
 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)

@ flaskbb . command ( 'celery' , context_settings = dict ( ignore_unknown_options = True ) ) @ click . argument ( 'celery_args' , nargs = ( - 1 ) , type = click . UNPROCESSED ) @ click . option ( 'show_help' , '--help' , '-h' , is_flag = True , help = 'Shows this message and exits' ) @ click . option ( 'show_celery_help' , '--help-celery' , is_flag = True , help = 'Shows the celery help message' ) @ click . pass_context @ with_appcontext def start_celery ( ctx , show_help , show_celery_help , celery_args ) : 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 )
preconfigured wrapper around the celery command .