mirror of
https://github.com/cookiecutter/cookiecutter-django.git
synced 2025-01-26 09:14:30 +03:00
Use django-celery-beat for scheduled tasks (#2084)
Use django-celery-beat for scheduled tasks
This commit is contained in:
commit
c3c0b441f2
|
@ -191,6 +191,7 @@ Listed in alphabetical order.
|
||||||
Will Farley `@goldhand`_ @g01dhand
|
Will Farley `@goldhand`_ @g01dhand
|
||||||
William Archinal `@archinal`_
|
William Archinal `@archinal`_
|
||||||
Yaroslav Halchenko
|
Yaroslav Halchenko
|
||||||
|
Keyvan Mosharraf `@keyvanm`_
|
||||||
========================== ============================ ==============
|
========================== ============================ ==============
|
||||||
|
|
||||||
.. _@a7p: https://github.com/a7p
|
.. _@a7p: https://github.com/a7p
|
||||||
|
@ -325,6 +326,7 @@ Listed in alphabetical order.
|
||||||
.. _@vladdoster: https://github.com/vladdoster
|
.. _@vladdoster: https://github.com/vladdoster
|
||||||
.. _@cmargieson: https://github.com/cmargieson
|
.. _@cmargieson: https://github.com/cmargieson
|
||||||
.. _@tanoabeleyra: https://github.com/tanoabeleyra
|
.. _@tanoabeleyra: https://github.com/tanoabeleyra
|
||||||
|
.. _@keyvanm: https://github.com/keyvanm
|
||||||
|
|
||||||
Special Thanks
|
Special Thanks
|
||||||
~~~~~~~~~~~~~~
|
~~~~~~~~~~~~~~
|
||||||
|
|
|
@ -75,7 +75,11 @@ THIRD_PARTY_APPS = [
|
||||||
"allauth.account",
|
"allauth.account",
|
||||||
"allauth.socialaccount",
|
"allauth.socialaccount",
|
||||||
"rest_framework",
|
"rest_framework",
|
||||||
|
{%- if cookiecutter.use_celery == 'y' %}
|
||||||
|
"django_celery_beat",
|
||||||
|
{%- endif %}
|
||||||
]
|
]
|
||||||
|
|
||||||
LOCAL_APPS = [
|
LOCAL_APPS = [
|
||||||
"{{ cookiecutter.project_slug }}.users.apps.UsersConfig",
|
"{{ cookiecutter.project_slug }}.users.apps.UsersConfig",
|
||||||
# Your stuff: custom apps go here
|
# Your stuff: custom apps go here
|
||||||
|
@ -270,6 +274,8 @@ CELERY_TASK_TIME_LIMIT = 5 * 60
|
||||||
# http://docs.celeryproject.org/en/latest/userguide/configuration.html#task-soft-time-limit
|
# http://docs.celeryproject.org/en/latest/userguide/configuration.html#task-soft-time-limit
|
||||||
# TODO: set to whatever value is adequate in your circumstances
|
# TODO: set to whatever value is adequate in your circumstances
|
||||||
CELERY_TASK_SOFT_TIME_LIMIT = 60
|
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 %}
|
{%- endif %}
|
||||||
# django-allauth
|
# django-allauth
|
||||||
|
|
|
@ -11,6 +11,7 @@ whitenoise==4.1.2 # https://github.com/evansd/whitenoise
|
||||||
redis==3.2.1 # https://github.com/antirez/redis
|
redis==3.2.1 # https://github.com/antirez/redis
|
||||||
{%- if cookiecutter.use_celery == "y" %}
|
{%- if cookiecutter.use_celery == "y" %}
|
||||||
celery==4.3.0 # pyup: < 5.0 # https://github.com/celery/celery
|
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' %}
|
{%- if cookiecutter.use_docker == 'y' %}
|
||||||
flower==0.9.3 # https://github.com/mher/flower
|
flower==0.9.3 # https://github.com/mher/flower
|
||||||
{%- endif %}
|
{%- endif %}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user