killDeadClients

This commit is contained in:
Ben Wilson 2023-08-06 23:36:41 -04:00
parent 41e82a9984
commit d4ec2ab3b4
2 changed files with 5 additions and 2 deletions

1
config/default-0.json Normal file
View File

@ -0,0 +1 @@
{}

View File

@ -36,8 +36,10 @@ export class AppService implements OnModuleInit {
}
}
@Cron(CronExpression.EVERY_SECOND)
@Cron(CronExpression.EVERY_5_MINUTES)
private async killDeadClients() {
await this.clientService.killDeadClients();
if (process.env.NODE_APP_INSTANCE == null || process.env.NODE_APP_INSTANCE == '0') {
await this.clientService.killDeadClients();
}
}
}