-
Notifications
You must be signed in to change notification settings - Fork 2
✨ server: add bridge fee window tracking #925
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: window-rule
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| --- | ||
| "@exactly/server": patch | ||
| --- | ||
|
|
||
| ✨ add bridge fee window tracking |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -20,6 +20,7 @@ import panda from "./hooks/panda"; | |
| import persona from "./hooks/persona"; | ||
| import androidFingerprints from "./utils/android/fingerprints"; | ||
| import appOrigin from "./utils/appOrigin"; | ||
| import { feeRule } from "./utils/ramps/bridge"; | ||
| import { close as closeRedis } from "./utils/redis"; | ||
| import { closeAndFlush as closeSegment } from "./utils/segment"; | ||
|
|
||
|
|
@@ -322,8 +323,9 @@ const server = serve(app); | |
| export async function close() { | ||
| return new Promise((resolve, reject) => { | ||
| server.close((error) => { | ||
| Promise.allSettled([closeSentry(), closeRedis(), closeSegment(), database.$client.end()]) | ||
| .then((results) => { | ||
| Promise.allSettled([feeRule.stop(), closeSentry(), closeSegment(), database.$client.end()]) | ||
| .then(async (results) => { | ||
| await closeRedis(); | ||
| if (error) reject(error); | ||
|
Comment on lines
+326
to
329
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Bug: The server shutdown sequence can hang indefinitely if a BullMQ job is stuck, preventing Redis connections from being closed. Suggested FixWrap the Prompt for AI Agent |
||
| else if (results.some((result) => result.status === "rejected")) reject(new Error("closing services failed")); | ||
| else resolve(null); | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.