Exemple #1
0
class Command(CeleryCommand):
    """Run the celery periodic task scheduler."""
    options = (CeleryCommand.options + beat.get_options() +
               beat.preload_options)
    help = 'Old alias to the "celery beat" command.'

    def handle(self, *args, **options):
        beat.run(*args, **options)
Exemple #2
0
class Command(CeleryCommand):
    """Run the celery periodic task scheduler."""
    help = 'Old alias to the "celery beat" command.'
    options = (tuple(CeleryCommand.options) + tuple(beat.get_options()) +
               tuple(getattr(beat, 'preload_options', ())))

    def handle(self, *args, **options):
        beat.run(*args, **options)
Exemple #3
0
class Command(CeleryCommand):
    """Run the celery periodic task scheduler."""
    help = 'Old alias to the "celery beat" command.'
    options = (
        Option('-A', '--app', default=None),
        Option('--broker', default=None),
        Option('--loader', default=None),
        Option('--config', default=None),
        Option('--workdir', default=None, dest='working_directory'),
        Option('--result-backend', default=None),
        Option('--no-color', '-C', action='store_true', default=None),
        Option('--quiet', '-q', action='store_true'),
    )
    if beat.get_options() is not None:
        options = (options + CeleryCommand.options + beat.get_options())

    def handle(self, *args, **options):
        beat.run(*args, **options)
Exemple #4
0
class Command(CeleryCommand):
    """Run the celery periodic task scheduler."""
    help = 'Old alias to the "celery beat" command.'
    if CELERY_VERSION[0] < 4:
        options = (
            tuple(CeleryCommand.options) +
            tuple(beat.get_options()) +
            tuple(getattr(beat, 'preload_options', ()))
        )
    else:
        def add_arguments(self, parser):
            super().add_arguments(parser)
            beat.add_arguments(parser)

            # Deprecated args
            parser.add_argument("--workdir", help="deprecated")

    def handle(self, *args, **options):
        beat.run(*args, **options)