Skip to content

Commit

Permalink
feat: upgrade celery and use django-celery-beat for periodic tasks
Browse files Browse the repository at this point in the history
Change-Id: I56c08e7b089e31ba7304bb947f8be71a4a472f62
  • Loading branch information
Guillaume-sousa committed Jan 11, 2022
1 parent ac921f2 commit 6cf062e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
4 changes: 3 additions & 1 deletion mdcs/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
}
}

DEFAULT_AUTO_FIELD = 'django.db.models.BigAutoField'
DEFAULT_AUTO_FIELD = "django.db.models.BigAutoField"

MONGO_HOST = os.environ["MONGO_HOST"] if "MONGO_HOST" in os.environ else ""
MONGO_PORT = os.environ["MONGO_PORT"] if "MONGO_PORT" in os.environ else "27017"
Expand Down Expand Up @@ -76,6 +76,7 @@
REDIS_URL = f"redis://{REDIS_HOST}:{REDIS_PORT}"
BROKER_URL = REDIS_URL
CELERY_RESULT_BACKEND = REDIS_URL
CELERYBEAT_SCHEDULER = "django_celery_beat.schedulers:DatabaseScheduler"

# Application definition

Expand All @@ -96,6 +97,7 @@
"tz_detect",
"defender",
"captcha",
"django_celery_beat",
# Core apps
"core_main_app",
"core_exporters_app",
Expand Down
3 changes: 1 addition & 2 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
celery==4.4.7
kombu==4.6.11
celery==5.2.3
Django==3.2.*
mongoengine==0.23.0

0 comments on commit 6cf062e

Please sign in to comment.