Skip to content

Route scheduled balance monitoring through QueueHandler#147

Merged
TaprootFreak merged 1 commit intoLightningDotSpace:developfrom
TaprootFreak:fix/scheduled-monitoring-race-condition
Feb 14, 2026
Merged

Route scheduled balance monitoring through QueueHandler#147
TaprootFreak merged 1 commit intoLightningDotSpace:developfrom
TaprootFreak:fix/scheduled-monitoring-race-condition

Conversation

@TaprootFreak
Copy link
Contributor

Summary

  • processScheduledBalanceMonitoring() was calling processBalances() and processChannels() directly, bypassing the QueueHandler used by the webhook-triggered processBalanceMonitoring()
  • This could cause race conditions when both cron and webhook paths run concurrently
  • Now routes through processBalanceMonitoring(), which serializes all balance processing through the existing QueueHandler

Test plan

  • yarn lint passes
  • yarn build passes
  • Verify cron still triggers every 5 minutes in dev/staging logs
  • Confirm no duplicate or conflicting DB writes when webhook and cron overlap

processScheduledBalanceMonitoring() was calling processBalances() and
processChannels() directly, bypassing the QueueHandler used by the
webhook-triggered processBalanceMonitoring(). This could cause race
conditions when both paths run concurrently.

Use processBalanceMonitoring() instead, which serializes all balance
processing through the existing QueueHandler.
@TaprootFreak TaprootFreak marked this pull request as ready for review February 14, 2026 20:04
@TaprootFreak TaprootFreak merged commit d4c21c6 into LightningDotSpace:develop Feb 14, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants