Download celery_worker.py from Smartlyqofficial/testchatbot: direct link, hf CLI and curl.
- Browser
- Download file 501 Bytes
-
https://huggingface.co/spaces/Smartlyqofficial/testchatbot/resolve/main/celery_worker.py
- Command line
-
hf download hf://spaces/Smartlyqofficial/testchatbot/celery_worker.py
-
curl -L -o celery_worker.py https://huggingface.co/spaces/Smartlyqofficial/testchatbot/resolve/main/celery_worker.py
501 Bytes
| # celery_worker.py | |
| from celery import Celery | |
| # --- FIX: THIS IS THE CORRECTED URL --- | |
| REDIS_URL = "rediss://default:AR_OAAImcDFjYjFjODg2MDdlYTI0NmY1OTc3MzMxNGM3MzU5MDgwMnAxODE0Mg@guiding-firefly-8142.upstash.io:6379?ssl_cert_reqs=CERT_NONE" | |
| celery_app = Celery('tasks', broker=REDIS_URL, backend=REDIS_URL) | |
| # Optional configuration | |
| celery_app.conf.update( | |
| task_serializer='json', | |
| accept_content=['json'], | |
| result_serializer='json', | |
| timezone='UTC', | |
| enable_utc=True, | |
| ) |