Move duplicated quoting DB logic for OB and autopilot into shared - #4939
Conversation
Signed-off-by: Aryan Godara <aryangodara03@gmail.com>
…icated-quoting-logic-to-shared Signed-off-by: Aryan Godara <aryangodara03@gmail.com>
…icated-quoting-logic-to-shared Signed-off-by: Aryan Godara <aryangodara03@gmail.com>
|
Claude finished @AryanGodara's task in 1m 13s —— View job PR Review: Move duplicated quoting DB logic into sharedReviewed the refactor. This is a clean, behavior-preserving move — no blocking issues found. ✅ What I verified:
Minor (non-blocking) nit: the module doc at
(Couldn't attach this inline since those lines aren't part of the diff.) |
…icated-quoting-logic-to-shared Signed-off-by: Aryan Godara <aryangodara03@gmail.com> # Conflicts: # crates/shared/src/quote_storage.rs
Description
The
QuoteStoringsave/get/find impls were duplicated for orderbook and autopilot. Moves them intoshared/quote_storage.rs, where the fast-pathsave_quote_competitionlogic already live, so both flows share singular implementation.Changes
save_quote,get_quote,find_quotetoshared::quote_storage, each taking&PgPooland owning its own connection/transaction.save_quote_competitionprivate. its only caller is nowsave_quote.QuoteStoring for Postgresimpls just start a metrics timer and delegate; the timer stays per-crate (separateMetricstypes).database::PgPooltype alias sosharednames the pool type without a directsqlxdependency.How to test
Existing unit and e2e tests (no expected behaviour chagnes)
Closes BE-284