UptimeFlare/worker
jakevis 6ba954866e
fix: skipErrorChangeNotification drops the DOWN notification when gracePeriod is set
With `skipErrorChangeNotification: true`, a notification was treated as an
"error reason change" whenever the incident had not started in the current
run:

  currentIncident.start[0] !== currentTimeSecond

That holds for the very first DOWN notification too when `gracePeriod` is
set, because that one is sent `gracePeriod` minutes after the incident
started. So with both options enabled no DOWN notification was sent at all,
while the UP notification still was.

Work out whether this is the first notification of the incident (sent
immediately without a grace period, or when the grace period is met) and
only skip the ones after it. Behaviour without `gracePeriod`, or without
`skipErrorChangeNotification`, is unchanged.

Co-Authored-By: Claude <noreply@anthropic.com>
2026-11-19 10:10:10 -08:00
..
src fix: skipErrorChangeNotification drops the DOWN notification when gracePeriod is set 2026-11-19 10:10:10 -08:00
.gitignore wip: worker & pages 2023-10-14 15:21:52 +08:00
.prettierrc.yaml misc: run prettier 2025-04-19 21:50:43 +08:00
package-lock.json feat(worker): check all targets in parellel, reduces ~15% cpu time usage in test, also try to a fix rare race condition 2026-01-19 00:52:32 +08:00
package.json feat(worker): check all targets in parellel, reduces ~15% cpu time usage in test, also try to a fix rare race condition 2026-01-19 00:52:32 +08:00
tsconfig.json fix: typo in flag and cleanup 2025-12-29 22:09:30 +08:00
wrangler.toml [WIP] feat: local deployment, still need more testing, data migration & CI todo 2026-01-01 02:26:37 +08:00