tiffank1802 commited on
Commit
420aa0c
·
1 Parent(s): 8348bee

Fix celery.py to only define app when not HF_SPACES

Browse files
Files changed (1) hide show
  1. simulationserver/celery.py +3 -4
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
- @app.task(bind=True, ignore_result=True)
14
- def debug_task(self):
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}')