1

I want to use dynamic scheduler management for celery. I know djcelery have that functionality with database support. But currently I do not use Django, but Flask. I couldn't find out Flask project or implementation with djcelery.schedulers.

Is it possible to use djcelery and implement dynamic scheduler management system without Django?

davidism
  • 121,510
  • 29
  • 395
  • 339
Jony cruse
  • 815
  • 1
  • 13
  • 23
  • When you say "dynamic scheduler management", what do you mean? Changing the task set at runtime? This sounds like [http://stackoverflow.com/questions/10194975/how-to-dynamically-add-remove-periodic-tasks-to-celery-celerybeat](this). – bwarren2 Jul 29 '15 at 14:41
  • Yes, I mean something like that question. Specifically, I want to add the task with arguments and runtime to celery via API and remove that task also via API. – Jony cruse Jul 29 '15 at 23:37

2 Answers2

1

Short answer: No, but...

You have to use django. The scheduler's entries are instances of django models so you would have to setup djcelery app somehow (see this code: https://github.com/celery/django-celery/blob/master/djcelery/schedulers.py) Also you won't have the admin interface to add scheduler's entries.

This is just a guess, but you can try setting django's ORM standalone and syncing djcelery's models. (see: Use Django ORM as standalone)

You can also implement your own scheduler following the structure of djcelery/schedulers.py

Also see: Can celery celerybeat use a Database Scheduler without Django?

Community
  • 1
  • 1
Ale
  • 1,315
  • 9
  • 19
  • Thanks, I'll try to replace Django ORM of djcelery with SQLAlchemy. If you know the project of SQLAlchemy with djcelery, please tell me. – Jony cruse Jul 29 '15 at 23:39
0

You can check out this flask-djcelery. It configures djcelery with flask, allows using django admin and also provide a browseable rest api for managing tasks.

Waqas Javed
  • 743
  • 8
  • 18