Skip to content

Commit

Permalink
install django celery beat
Browse files Browse the repository at this point in the history
  • Loading branch information
mosesmc52 committed Dec 26, 2021
1 parent a4daed9 commit 0f6dd97
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ services:

celery-beat:
build: .
command: celery -A waterquality beat -l info
command: celery -A waterquality beat -l info --scheduler django_celery_beat.schedulers:DatabaseScheduler
env_file:
- ./.env
depends_on:
Expand Down
1 change: 1 addition & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ chardet==3.0.4
dj-database-url==0.5.0
Django==3.0.12
django-annoying==0.9.0
django-celery-beat==2.1.0
django-celery-results==1.2.1
django-localflavor==2.2
django-pandas==0.6.1
Expand Down
3 changes: 3 additions & 0 deletions settings/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@
'django.contrib.gis',
'rest_framework',
'django_celery_results',
'django_celery_beat',
'app',
'news',
'rawdata',
Expand Down Expand Up @@ -131,11 +132,13 @@
STATICFILES_DIRS = (os.path.join(BASE_DIR, 'assets'),)
STATIC_ROOT = os.path.join(BASE_DIR, 'static')

# celery configuration
CELERY_RESULT_BACKEND = 'django-db'
CELERY_BROKER_URL = get_env_variable('CELERY_BROKER_URL')
CELERY_ACCEPT_CONTENT = ['json']
CELERY_TASK_SERIALIZER = 'json'
CELERY_RESULT_SERIALIZER = 'json'
CELERY_TIMEZONE = 'America/Denver'


# Email Configurations
Expand Down

0 comments on commit 0f6dd97

Please sign in to comment.