FoundKey/packages/backend
Chloe Kudryavtsev 91a4f38871 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
..
.vscode Update settings.json 2022-04-15 21:33:00 +09:00
assets chore: Change Misskey references to Foundkey 2022-09-13 13:19:36 -04:00
migration add down-migration for renote mutes 2022-10-11 10:42:39 +00:00
src backend: add automatic dead instance detection 2022-10-16 12:16:04 +00:00
test backend: remove unused prelude modules 2022-10-11 01:53:34 -04:00
.eslintignore migrate to Yarn 3.2.3 2022-08-26 15:24:29 -04:00
.eslintrc.cjs test: __dirnameはESModuleでは使えないので置き換えた (#8626) 2022-05-14 16:09:47 +09:00
.mocharc.json fix broken mocha tests v2 2022-07-13 12:49:58 +02:00
jsconfig.json use eslint 2021-11-12 10:35:41 +09:00
ormconfig.js refactor: migrate to typeorm 3.0 (#8443) 2022-03-26 15:34:00 +09:00
package.json Revert "Use native shell commands for clean/clean-all" 2022-09-22 13:48:06 -04:00
tsconfig.json backend: set moduleResolution to Node16 in tsconfig 2022-09-21 11:33:57 -04:00
watch.mjs implement dev command 2021-11-19 14:48:59 +09:00