Skip to content

Commit b26a170

Browse files
committed
fix
1 parent b6c9cb9 commit b26a170

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# This will make sure the app is always imported when
2+
# Django starts so that shared_task will use this app.
3+
from .celery import app as celery_app
4+
5+
__all__ = ('celery_app',)

pythonkr_backend/pythonkr_backend/celery.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,6 @@ def init_beat(*args, **kwargs):
3434
def add(x: int, y: int):
3535
return x + y
3636

37-
add.delay(42, 50)
38-
39-
4037
app.conf.beat_schedule = {
4138
"add-every-30-seconds": {
4239
"task": "tasks.add",

0 commit comments

Comments
 (0)