Add domain_events migration and SeaORM entity. Modify EventBus::publish to persist events before broadcasting (best-effort: DB failure logs warning but still broadcasts in-memory). Update all 19 publish call sites across 4 crates to pass db reference. Add outbox relay background task that polls pending events every 5s and re-broadcasts them, ensuring no events are lost on server restart.
33 lines
733 B
TOML
33 lines
733 B
TOML
[package]
|
|
name = "erp-server"
|
|
version.workspace = true
|
|
edition.workspace = true
|
|
|
|
[[bin]]
|
|
name = "erp-server"
|
|
path = "src/main.rs"
|
|
|
|
[dependencies]
|
|
erp-core.workspace = true
|
|
erp-common.workspace = true
|
|
tokio.workspace = true
|
|
axum.workspace = true
|
|
tower.workspace = true
|
|
tower-http.workspace = true
|
|
tracing.workspace = true
|
|
tracing-subscriber.workspace = true
|
|
config.workspace = true
|
|
sea-orm.workspace = true
|
|
redis.workspace = true
|
|
utoipa.workspace = true
|
|
serde_json.workspace = true
|
|
serde.workspace = true
|
|
erp-server-migration = { path = "migration" }
|
|
erp-auth.workspace = true
|
|
erp-config.workspace = true
|
|
erp-workflow.workspace = true
|
|
erp-message.workspace = true
|
|
anyhow.workspace = true
|
|
uuid.workspace = true
|
|
chrono.workspace = true
|