Coverage for sites/ptf_tools/ptf_tools/celery.py: 100%
6 statements
« prev ^ index » next coverage.py v7.3.2, created at 2024-11-04 17:46 +0000
« prev ^ index » next coverage.py v7.3.2, created at 2024-11-04 17:46 +0000
1import os
3from celery import Celery
5# set the default Django settings module for the 'celery' program.
6os.environ.setdefault("DJANGO_SETTINGS_MODULE", "ptf_tools.settings")
8app = Celery("ptf_tools")
10# Using a string here means the worker don't have to serialize
11# the configuration object to child processes.
12# - namespace='CELERY' means all celery-related configuration keys
13# should have a `CELERY_` prefix.
14app.config_from_object("django.conf:settings", namespace="CELERY")
16# Load task modules from all registered Django app configs.
17app.autodiscover_tasks()