A DatabaseScheduler adaptation designed for use with django-tenants.
Task scheduler based on DatabaseScheduler. Allows configuration Celery tasks in DB for each individual tenant. Precisely tested with these types of tasks:
- periodic
- crontab
- First, configure
django-tenantsanddjango-tenants-celeryas you need. django_celery_beatmust be in yourTENANT_APPS- Specify the scheduler in the settings.py of your project:
CELERY_BEAT_SCHEDULER = "celery_beat_tenants_scheduler.scheduler.TenantDatabaseScheduler"or in docker-compose.yml
command: celery -A project beat -l debug --scheduler celery_beat_tenants_scheduler.scheduler.TenantDatabaseScheduler