Skip to content
This repository was archived by the owner on Jun 6, 2022. It is now read-only.
This repository was archived by the owner on Jun 6, 2022. It is now read-only.

Dynamic update of the celery_crontab_schedule table? #15

@xtiansimon

Description

@xtiansimon

Hello,
I've installed this package. The echo task examples are all running as expected. I added my own toy task that writes a test file to a directory--All good. Great project. Thank you.

Reading your code and examples I wish for one feature not mentioned in documentation. I am searching for a solution to support my Flask project. I need to dynamically change (create, update, delete) the SQL tables in celery-sqlalchemy-scheduler without restarting Flask, Celery workers, or Celery Beat.

I don't need to add new functions to tasks.py. I just need to add new task instances and change schedules.
For example,

  • Add a new task row (create new tasks.add with args [1,5]) in the celery_periodic_task table.
  • Update row feature args from [1,2] to [10,2] in the celery_periodic_task table.
  • Update row with features of the celery_crontab_schedule table, and change (0 4 * * *) to (* */4 * * *).

Can I update tasks in the SQL tables to achieve 'dynamic' updates with this project?

There is another older package celery_sqlalchemy_scheduler which promised to 'dynamically add tasks at runtime' and this package is based on Celery v3. I was happy to find your project using Celery v4, because I understand v4 has added additional decorators to update Celery Beat at runtime--if I understand this correctly, but I'm still a little new to the guts and gears of Celery. It's all very complex.

Thanks again. Great project.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions