mirror of
https://github.com/ajayyy/SponsorBlockServer.git
synced 2026-01-02 22:59:10 +03:00
Only use redis timeout when db not under load
This commit is contained in:
@@ -283,4 +283,8 @@ export class Postgres implements IDatabase {
|
||||
highLoad() {
|
||||
return this.activePostgresRequests > this.config.postgres.highLoadThreshold;
|
||||
}
|
||||
|
||||
shouldUseRedisTimeout() {
|
||||
return this.activePostgresRequests < this.config.postgres.redisTimeoutThreshold;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user