feat: suspend instance improvements (#13861)

* feat(backend): dead instance detection

* feat(backend): suspend type detection

* feat(frontend): show suspend reason on frontend

* feat(backend): resume federation automatically if the server is automatically suspended

* docs(changelog): 配信停止まわりの改善

* lint: fix lint errors

* Update packages/frontend/src/pages/instance-info.vue

* lint: fix lint error

* chore: suspendedState => suspensionState

---------

Co-authored-by: syuilo <4439005+syuilo@users.noreply.github.com>
This commit is contained in:
anatawa12
2024-05-23 15:55:47 +09:00
committed by GitHub
parent 611e303bab
commit 83a9aa4533
15 changed files with 193 additions and 17 deletions

View File

@@ -81,13 +81,22 @@ export class MiInstance {
public isNotResponding: boolean;
/**
* このインスタンスへの配信を停止するか
* このインスタンスと不通になった日時
*/
@Column('timestamp with time zone', {
nullable: true,
})
public notRespondingSince: Date | null;
/**
* このインスタンスへの配信状態
*/
@Index()
@Column('boolean', {
default: false,
@Column('enum', {
default: 'none',
enum: ['none', 'manuallySuspended', 'goneSuspended', 'autoSuspendedForNotResponding'],
})
public isSuspended: boolean;
public suspensionState: 'none' | 'manuallySuspended' | 'goneSuspended' | 'autoSuspendedForNotResponding';
@Column('varchar', {
length: 64, nullable: true,