Extract shared wiring logic between main.rs and worker/main.rs #18
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Severity: Low
crates/presentation/src/main.rswire_dependencies()(~150 lines) andcrates/worker/src/main.rsmain()(~200 lines) duplicate most of the same wiring logic: database connection, federation setup, event bus creation, enrichment handler construction.The
infra-wiringcrate exists but only holds types/config, not the actual wiring. A sharedwire()function ininfra-wiringthat returns all the arcs would cut both files in half and eliminate a class of bugs where one binary gets a new adapter wired but the other doesn't.