First Run¶
Run modes¶
See Run Modes for full details.
Example invocations¶
# One-shot run, worker only:
uv run python src/main.py --config-file config.yaml --run-once
# Continuous loop:
uv run python src/main.py --config-file config.yaml
# API + worker:
uv run python src/main.py --config-file config.yaml --mode both
# Re-run emitters only (no pipeline, no data collection):
uv run python src/main.py --config-file config.yaml --emit-once
What happens on first run¶
- Storage backend created (tables migrated via Alembic)
- Plugin initialized with ecosystem-specific credentials
- Billing data fetched for
lookback_dayswindow (default 200) - Resources and identities discovered per handler
- Costs allocated per billing line + product type
- Chargeback rows written to storage
EmitterRunnerdispatches pending dates to each configured emitter; outcomes persisted- Loop sleeps for
features.refresh_intervalseconds (default 1800)
--emit-once flag¶
Runs EmitterRunner for all configured tenants without triggering a pipeline
run, then exits. Use this to replay emitters after a destination outage:
The engine reads pending (not yet emitted or previously failed) dates from storage and dispatches them to each emitter. No billing data is fetched and no chargeback recalculation occurs.
Reading logs¶
gathered = billing dates fetched from source
calculated = dates where allocation was computed
rows = chargeback rows written to storage + emitters
Common first-run issues¶
See Troubleshooting.