Skip to content

fix: alert when no vehicle states written for an agency (fixes #31)#44

Open
iamlegendharsh wants to merge 1 commit intotrynmaps:masterfrom
iamlegendharsh:fix/issue-31-agency-alert
Open

fix: alert when no vehicle states written for an agency (fixes #31)#44
iamlegendharsh wants to merge 1 commit intotrynmaps:masterfrom
iamlegendharsh:fix/issue-31-agency-alert

Conversation

@iamlegendharsh
Copy link

What this fixes

Closes #31

Changes

  • Added lastSuccessfulWrite tracker per agency
  • Added sendAlert() that logs to stderr and optionally POSTs to a webhook
  • Added periodic setInterval check every 5 minutes
  • Fixed Promise.all not being returned in saveVehicles()
  • Changed console.log to console.error for error logging

Testing

  • Set ALERT_THRESHOLD_MS to 30s locally
  • Blocked provider API → confirmed alert fired
  • Restored config → confirmed no false alerts

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.

alerts if vehicles not being added

1 participant