-
Notifications
You must be signed in to change notification settings - Fork 3
fix: tx prices linking, dashboard load, initial sync errors #1132
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
Open
chedieck
wants to merge
23
commits into
master
Choose a base branch
from
fix/tx-prices-linking
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
23 commits
Select commit
Hold shift + click to select a range
3ebc4a0
fix: don't sed dump
chedieck 03e107c
chore: improve testing from dump
chedieck c275f8e
chore: improve testing from dump 2
chedieck 054ccda
fix: dev-from-dump setup (named volume, prisma deploy, pv progress)
chedieck a7c0814
feat: SKIP_CACHE_REBUILD to prevent I/O saturation with prod data
chedieck 18879a6
chore: ignore .forever
chedieck 25b5016
fix: skip txs with missing prices instead of failing entire batch
chedieck 8ce9149
fix: resilient chronik WebSocket with retry + bump sync concurrency t…
chedieck 6fdb0f6
fix: undo 16 -> 64 bump
chedieck b72ce29
fix: throttle TX_CONFIRMED handler to max 6 concurrent (prevents DB c…
chedieck 72333f3
perf: non-blocking payment cache rebuild with background backfill and…
chedieck 4a93f89
fix: non-blocking cache rebuild with progressive UX
chedieck 5bdf53f
perf: fix payments page blocking on cache rebuild
chedieck 59373c9
perf: fix page loads blocking on cache rebuild I/O saturation
chedieck a4b6f5c
fix: revert backgroundPrisma - was starving websocket handlers
chedieck 5392e6c
chore: remove changes from other PR
chedieck 68ad97b
fix: revert 30s TTL cache during rebuild - don't cache partial data
chedieck 3b198d0
test: update tests for generateAddressPaymentInfo aggregate refactor
chedieck 678f9f4
test: expect cacheRebuilding in dashboard response during integration…
chedieck f83885d
refactor: extract WS retry constants (CHRONIK_WS_MAX_RETRIES, CHRONIK…
chedieck ff1a38f
Merge branch 'master' into fix/tx-prices-linking
chedieck e5eafb3
refactor: rename chronik retry constants to CHRONIK_HTTP_* and CHRONI…
chedieck 3d9c4bd
fix: constants names
chedieck File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,2 +1,4 @@ | ||
| IGNORE_SEEDING=true | ||
| DONT_EXECUTE_TRIGGERS=true | ||
| FROM_DUMP=true | ||
| SKIP_CACHE_REBUILD=true |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -39,3 +39,4 @@ prisma-local/seeds/productionTxs.csv | |
| paybutton-config.json | ||
|
|
||
| dump.sql* | ||
| .forever | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Polling stops after the first refresh.
This effect only depends on the boolean
dashboardData?.cacheRebuilding. If the first refresh still returnscacheRebuilding: true, the dependencies do not change, so no second timer is scheduled. Long-running rebuilds will therefore update once and then stall.Suggested fix
useEffect(() => { if (dashboardData?.cacheRebuilding !== true) return - const timer = setTimeout(() => { - let url = 'api/dashboard' - if (selectedButtonIds.length > 0) { - url += `?buttonIds=${selectedButtonIds.join(',')}` - } - fetch(url, { headers: { Timezone: moment.tz.guess() } }) - .then(async res => await res.json()) - .then(json => { setDashboardData(json) }) - .catch(console.error) - }, 15000) - return () => clearTimeout(timer) - }, [dashboardData?.cacheRebuilding, selectedButtonIds]) + const interval = setInterval(() => { + let url = 'api/dashboard' + if (selectedButtonIds.length > 0) { + url += `?buttonIds=${selectedButtonIds.join(',')}` + } + fetch(url, { headers: { Timezone: moment.tz.guess() } }) + .then(async res => await res.json()) + .then(json => { setDashboardData(json) }) + .catch(console.error) + }, 15000) + return () => clearInterval(interval) + }, [dashboardData, selectedButtonIds])🤖 Prompt for AI Agents