Download src/workers/main.py from anaselamr/yaz: direct link, hf CLI and curl.
- Browser
- Download file 723 Bytes
-
https://huggingface.co/spaces/anaselamr/yaz/resolve/main/src/workers/main.py
- Command line
-
hf download hf://spaces/anaselamr/yaz/src/workers/main.py
-
curl -L -o main.py https://huggingface.co/spaces/anaselamr/yaz/resolve/main/src/workers/main.py
723 Bytes
| """ | |
| YAZ Care Platform — Worker Entry Point | |
| ======================================= | |
| Docker-compose entry point: ``python3 -m src.workers.main`` | |
| Delegates to workers.worker which contains the full arq WorkerSettings. | |
| Usage:: | |
| # Docker (staging/prod profiles) | |
| python3 -m src.workers.main | |
| # Direct | |
| python -m workers.worker | |
| """ | |
| from __future__ import annotations | |
| import sys | |
| from pathlib import Path | |
| # Ensure src/ is importable when invoked as `python3 -m src.workers.main` | |
| _src = Path(__file__).resolve().parent.parent | |
| if str(_src) not in sys.path: | |
| sys.path.insert(0, str(_src)) | |
| if __name__ == "__main__": | |
| import runpy | |
| runpy.run_module("workers.worker", run_name="__main__", alter_sys=True) | |