🚀 Running The Service
Boot sequence, configuration, and operational runbooks.
🏃 Boot
main.py calls init() (wiring from init.py), registers handlers, and serves. worker.py runs poll_fetch_requests(resources) in a loop.
🔌 Configuration
Everything is env-var driven (see Reports & Caching for the full table). Minimal .env:
Secret-ish values (LLM keys, IMAP creds) go through the secrets adapter in infra/adaptors/ — never commit real keys.
🧑💻 Local Workflow
Requires MongoDB (and Redis for the cache mirror). A local Mongo on mongodb://localhost:27017 is the default dev target.
⚙️ Production Notes
- Run API and worker as separate processes/service units.
- Keep
WORKER_MAX_RETRIESbounded so poisoned fetch requests fail fast. - Point
REDIS_URLat a real Redis before enabling the HTTP cache. - Fetch requests flip
pausedon ambiguity; a resolver (LLM) must be wired to auto-advance them.
🔗 Related
Fetch Request Workflow · Development · Development — Environment