-
Couldn't load subscription status.
- Fork 471
Support for abstract base models improved. (#516) #534
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
Model classes moved into a `models.py` directory, which exports by default only the default `django-celery-beat` model classes now from `models.generic.py`. `managers.py` moved into `models.py` directory, because it's something that is needed only by models.
|
@auvipy any plans to merge this soon? |
|
no, there are other priorities for a long overdue release |
`crontab_schedule_celery_timezone` wasn't exported properly and raised an `AttributeError` when applying migrations.
…ry#516) when `CELERY_BEAT_(?:PERIODICTASKS?|(?:CRONTAB|INTERVAL|SOLAR|CLOCKED)SCHEDULE)_MODEL` constants are defined in django `settings`. Providing the `app_label.model_name` of your own models as value for the constants `CELERY_BEAT_(?:PERIODICTASKS?|(?:CRONTAB|INTERVAL|SOLAR|CLOCKED)SCHEDULE)_MODEL` will let `django_celery_beat.scheduler` use the custom models instead of the default ones (aka generic models, in this context/pull-request): ```python CELERY_BEAT_PERIODICTASK_MODEL = "app_label.model_name" CELERY_BEAT_PERIODICTASKS_MODEL = "app_label.model_name" CELERY_BEAT_CRONTABSCHEDULE_MODEL = "app_label.model_name" CELERY_BEAT_INTERVALSCHEDULE_MODEL = "app_label.model_name" CELERY_BEAT_SOLARSCHEDULE_MODEL = "app_label.model_name" CELERY_BEAT_CLOCKEDSCHEDULE_MODEL = "app_label.model_name" ``` Doing this we add support to automatically bypass the default `django_celery_beat` models without forcing developers to overwrite the whole `django_celery_beat.scheduler` in projects where the default models doesn't fit the requirements I updated the `README.rst` with a small explanation about how this work Additonal information: * related issue: celery#516 * pull-request: celery#534
|
I do think this would be useful - for example, I'd like to add a description field to have a human-readable description for the interval/cron/solar schedule. |
|
Git conflicts — please rebase. |
|
I will try to do it asap |
Model classes moved into a
models.pydirectory, which exports by default only the defaultdjango-celery-beatmodel classes now frommodels.generic.py.managers.pymoved intomodels.pydirectory, because it's something that is needed only by models.