File tree Expand file tree Collapse file tree 2 files changed +8
-9
lines changed
pythonkr_backend/pythonkr_backend Expand file tree Collapse file tree 2 files changed +8
-9
lines changed Original file line number Diff line number Diff line change 1
1
# This will make sure the app is always imported when
2
2
# Django starts so that shared_task will use this app.
3
- import os
3
+ from . celery import app as celery_app
4
4
5
- DJANGO_SETTINGS_MODULE = os .environ .get ("DJANGO_SETTINGS_MODULE" )
6
-
7
- if "prod" in DJANGO_SETTINGS_MODULE :
8
- from .celery import app as celery_app
9
- __all__ = ('celery_app' ,)
10
- else :
11
- __all__ = ()
5
+ __all__ = ('celery_app' ,)
Original file line number Diff line number Diff line change
1
+ import os
1
2
import logfire
2
3
from celery import Celery
3
4
from celery .signals import worker_init , beat_init
4
5
5
- app = Celery ('proj' )
6
+
7
+ # Set the default Django settings module for the 'celery' program.
8
+ os .environ .setdefault ('DJANGO_SETTINGS_MODULE' , 'pythonkr_backend.settings' )
9
+
10
+ app = Celery ('pythonkr_backend' )
6
11
7
12
8
13
# Using a string here means the worker doesn't have to serialize
You can’t perform that action at this time.
0 commit comments