Skip to content

Commit 26f432a

Browse files
committed
fix typo
1 parent ef76df6 commit 26f432a

File tree

2 files changed

+8
-9
lines changed

2 files changed

+8
-9
lines changed
Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,5 @@
11
# This will make sure the app is always imported when
22
# Django starts so that shared_task will use this app.
3-
import os
3+
from .celery import app as celery_app
44

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',)

pythonkr_backend/pythonkr_backend/celery.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,13 @@
1+
import os
12
import logfire
23
from celery import Celery
34
from celery.signals import worker_init, beat_init
45

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')
611

712

813
# Using a string here means the worker doesn't have to serialize

0 commit comments

Comments
 (0)