Skip to content

Commit 46e24a1

Browse files
committed
2 parents b4bacbe + 9ab896a commit 46e24a1

File tree

3 files changed

+10
-3
lines changed

3 files changed

+10
-3
lines changed

django_celery_beat/__init__.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@
66

77
from collections import namedtuple
88

9+
import django
10+
911
__version__ = '2.2.0'
1012
__author__ = 'Asif Saif Uddin, Ask Solem'
1113
@@ -29,4 +31,5 @@
2931

3032
__all__ = []
3133

32-
default_app_config = 'django_celery_beat.apps.BeatConfig'
34+
if django.VERSION < (3, 2):
35+
default_app_config = 'django_celery_beat.apps.BeatConfig'

docs/includes/introduction.txt

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -207,9 +207,13 @@ Both the worker and beat services need to be running at the same time.
207207
$ celery -A [project-name] beat -l info --scheduler django_celery_beat.schedulers:DatabaseScheduler
208208

209209

210-
**OR** you can use the -S (scheduler flag), for more options see ``celery beat --help ``)::
210+
**OR** you can use the -S (scheduler flag), for more options see ``celery beat --help``)::
211211

212212
$ celery -A [project-name] beat -l info -S django
213+
214+
**OR** you can set the scheduler through Django's settings::
215+
216+
CELERY_BEAT_SCHEDULER = 'django_celery_beat.schedulers:DatabaseScheduler'
213217

214218

215219
Also, as an alternative, you can run the two steps above (worker and beat services)

requirements/default.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
celery>=4.4,<6.0
1+
celery>=5.0,<6.0
22
django-timezone-field>=4.1.0,<5.0
33
python-crontab>=2.3.4

0 commit comments

Comments
 (0)