generated from coulomb/repo-seed
feat(WP-0004): railiance deployment & service ops
- Dockerfile (multi-stage, uv-based, slim runtime) - .dockerignore - docker-compose.railiance.yml (Temporal + NATS + PG, no Elasticsearch) - GET /health endpoint (db + temporal probes, 200/503) - .env.example (complete env var reference) - Makefile: migrate, sync-all, dev-up/down, railiance-up/down, start-worker, start-api, start-event-router, help targets; extracted sync-event-types Python to scripts/sync_event_types.py - SIGTERM graceful shutdown in worker.py and event_router.py - docs/runbook.md: Railiance deployment section Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
21
scripts/sync_event_types.py
Normal file
21
scripts/sync_event_types.py
Normal file
@@ -0,0 +1,21 @@
|
||||
import asyncio
|
||||
import os
|
||||
|
||||
from sqlalchemy.ext.asyncio import async_sessionmaker, create_async_engine
|
||||
|
||||
from activity_core.event_type_registry import sync_event_types
|
||||
|
||||
|
||||
async def main() -> None:
|
||||
db_url = os.environ.get(
|
||||
"ACTCORE_DB_URL",
|
||||
"postgresql+asyncpg://actcore:actcore@localhost:5433/actcore",
|
||||
)
|
||||
engine = create_async_engine(db_url)
|
||||
factory = async_sessionmaker(engine, expire_on_commit=False)
|
||||
n = await sync_event_types(factory)
|
||||
print(f"Synced {n} event types")
|
||||
await engine.dispose()
|
||||
|
||||
|
||||
asyncio.run(main())
|
||||
Reference in New Issue
Block a user