FoundKey/packages/backend/src/queue/processors
Chloe Kudryavtsev 91a4f38871
All checks were successful
ci/woodpecker/push/build Pipeline was successful
ci/woodpecker/push/lint-client Pipeline was successful
ci/woodpecker/push/lint-backend Pipeline was successful
ci/woodpecker/push/lint-foundkey-js Pipeline was successful
ci/woodpecker/push/test Pipeline was successful
backend: add automatic dead instance detection
It works by having a day-long cache of
"when did we last successfully communicate with this instance?"
Anything over a specified threshold (1 month) will act as though the instance
is suspended - all outgoing jobs are dropped on processing.
The day-long cache is in place because the ordering is necessarily a
linear scan.
Once an instance comes back online, we will detect that is the case as soon as
we receive an activity from them (which will update the "last communicated at")
field.

Potential future TODOs:
* Improve the caching system, it's actually pretty inefficient as it is.
  CacheBox with a call override?
* Think of ways to make it not-a-linear-scan, since the instances table can get
  pretty big. It's around 4500 on toast cafe.

ChangeLog: Added
2022-10-16 12:16:04 +00:00
..
db backend: allow to export only specific emoji 2022-10-12 01:49:53 +02:00
object-storage bacakend: prefer absolute over relative imports 2022-10-01 14:40:30 +02:00
system refactor expiring data and expire signins after 60 days 2022-10-02 00:18:07 +02:00
deliver.ts backend: add automatic dead instance detection 2022-10-16 12:16:04 +00:00
ended-poll-notification.ts remove unused logger 2022-07-12 14:44:19 +02:00
inbox.ts bacakend: prefer absolute over relative imports 2022-10-01 14:40:30 +02:00
webhook-deliver.ts bacakend: prefer absolute over relative imports 2022-10-01 14:40:30 +02:00