ovh / celery-director

Simple and rapid framework to build workflows with Celery
https://ovh.github.io/celery-director/
BSD 3-Clause "New" or "Revised" License
534 stars 58 forks source link

Celery 5.1.2 compliance #115

Closed christophe-deleuze closed 2 years ago

christophe-deleuze commented 3 years ago

Celery 5.1.2 compliance & fix windows issue on os separator

Note : Windows might only works if 'gunicorn' is replaced with 'waitress'

ncrocfer commented 2 years ago

Closed because too many changes in requirements and problem with Flower (related to what @fmalina said). Please open distinct PRs for Windows and Bump versions ;)

CodePint commented 2 years ago

@ncrocfer I will open distinct PRs for these.

this is the fix required for flower:

@celery.command(name="flower", context_settings=dict(ignore_unknown_options=True))
@click.argument("flower_args", nargs=-1, type=click.UNPROCESSED)
@pass_ctx
def flower(ctx, flower_args):
    """Start the flower instance"""
    broker = ctx.app.config["CELERY_CONF"]["broker_url"]
    args = [
        "celery",
        "-b",
        broker,
        "flower"
    ]
    args += list(flower_args)
    os.execvp(args[0], args)