Spaces:
Sleeping
Sleeping
Download celery_worker.py from vigneshwark/focusflow-api: direct link, hf CLI and curl.
- Browser
- Download file 401 Bytes
-
https://huggingface.co/spaces/vigneshwark/focusflow-api/resolve/main/celery_worker.py
- Command line
-
hf download hf://spaces/vigneshwark/focusflow-api/celery_worker.py
-
curl -L -o celery_worker.py https://huggingface.co/spaces/vigneshwark/focusflow-api/resolve/main/celery_worker.py
401 Bytes
| from celery import Celery | |
| import os | |
| from dotenv import load_dotenv | |
| load_dotenv() | |
| celery_app = Celery( | |
| "focusflow", | |
| broker=os.getenv("REDIS_URL", "redis://localhost:6379"), | |
| backend=os.getenv("REDIS_URL", "redis://localhost:6379"), | |
| ) | |
| celery_app.conf.update( | |
| task_serializer="json", | |
| result_serializer="json", | |
| accept_content=["json"], | |
| timezone="UTC", | |
| enable_utc=True, | |
| ) | |