Spaces:
Sleeping
Sleeping
| import os | |
| from celery import Celery | |
| HF_SPACES = os.environ.get('HF_SPACES', '').lower() in ('true', '1', 'yes') | |
| if not HF_SPACES: | |
| os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'simulationserver.settings') | |
| app = Celery('simulationserver') | |
| app.config_from_object('django.conf:settings', namespace='CELERY') | |
| app.autodiscover_tasks() | |
| def debug_task(self): | |
| print(f'Request: {self.request!r}') | |