Spaces:
Sleeping
Sleeping
tiffank1802 commited on
Commit ·
420aa0c
1
Parent(s): 8348bee
Fix celery.py to only define app when not HF_SPACES
Browse files
simulationserver/celery.py
CHANGED
|
@@ -9,7 +9,6 @@ if not HF_SPACES:
|
|
| 9 |
app.config_from_object('django.conf:settings', namespace='CELERY')
|
| 10 |
app.autodiscover_tasks()
|
| 11 |
|
| 12 |
-
|
| 13 |
-
|
| 14 |
-
|
| 15 |
-
print(f'Request: {self.request!r}')
|
|
|
|
| 9 |
app.config_from_object('django.conf:settings', namespace='CELERY')
|
| 10 |
app.autodiscover_tasks()
|
| 11 |
|
| 12 |
+
@app.task(bind=True, ignore_result=True)
|
| 13 |
+
def debug_task(self):
|
| 14 |
+
print(f'Request: {self.request!r}')
|
|
|