mirror of
https://github.com/cookiecutter/cookiecutter-django.git
synced 2024-11-26 19:44:00 +03:00
Set celery beat scheduler using settings + install django_celery_beat if use_celery
This commit is contained in:
parent
915848e279
commit
631bddc811
|
@ -5,4 +5,4 @@ set -o nounset
|
|||
|
||||
|
||||
rm -f './celerybeat.pid'
|
||||
celery -A config.celery_app beat -l INFO --scheduler django_celery_beat.schedulers:DatabaseScheduler
|
||||
celery -A config.celery_app beat -l INFO
|
||||
|
|
|
@ -5,4 +5,4 @@ set -o pipefail
|
|||
set -o nounset
|
||||
|
||||
|
||||
celery -A config.celery_app beat -l INFO --scheduler django_celery_beat.schedulers:DatabaseScheduler
|
||||
celery -A config.celery_app beat -l INFO
|
||||
|
|
|
@ -75,6 +75,9 @@ THIRD_PARTY_APPS = [
|
|||
"allauth.account",
|
||||
"allauth.socialaccount",
|
||||
"rest_framework",
|
||||
{% if cookiecutter.use_celery == 'y' -%}
|
||||
"django_celery_beat",
|
||||
{%- endif %}
|
||||
]
|
||||
LOCAL_APPS = [
|
||||
"{{ cookiecutter.project_slug }}.users.apps.UsersConfig",
|
||||
|
@ -270,6 +273,8 @@ CELERY_TASK_TIME_LIMIT = 5 * 60
|
|||
# http://docs.celeryproject.org/en/latest/userguide/configuration.html#task-soft-time-limit
|
||||
# TODO: set to whatever value is adequate in your circumstances
|
||||
CELERY_TASK_SOFT_TIME_LIMIT = 60
|
||||
# http://docs.celeryproject.org/en/latest/userguide/configuration.html#beat-scheduler
|
||||
CELERY_BEAT_SCHEDULER = "django_celery_beat.schedulers:DatabaseScheduler"
|
||||
|
||||
{%- endif %}
|
||||
# django-allauth
|
||||
|
|
|
@ -11,6 +11,7 @@ whitenoise==4.1.2 # https://github.com/evansd/whitenoise
|
|||
redis==3.2.1 # https://github.com/antirez/redis
|
||||
{%- if cookiecutter.use_celery == "y" %}
|
||||
celery==4.3.0 # pyup: < 5.0 # https://github.com/celery/celery
|
||||
django-celery-beat==1.5.0 # https://github.com/celery/django-celery-beat
|
||||
{%- if cookiecutter.use_docker == 'y' %}
|
||||
flower==0.9.3 # https://github.com/mher/flower
|
||||
{%- endif %}
|
||||
|
|
Loading…
Reference in New Issue
Block a user