mirror of
https://github.com/ajayyy/SponsorBlockServer.git
synced 2025-12-10 21:47:02 +03:00
Make default have no max requests
This commit is contained in:
@@ -77,7 +77,7 @@ addDefaults(config, {
|
||||
max: 10,
|
||||
idleTimeoutMillis: 10000,
|
||||
maxTries: 3,
|
||||
maxActiveRequests: -1
|
||||
maxActiveRequests: 0
|
||||
},
|
||||
postgresReadOnly: {
|
||||
enabled: false,
|
||||
|
||||
@@ -105,7 +105,8 @@ export class Postgres implements IDatabase {
|
||||
|
||||
Logger.debug(`prepare (postgres): type: ${type}, query: ${query}, params: ${params}`);
|
||||
|
||||
if (this.activePostgresRequests > this.config.postgres.maxActiveRequests) {
|
||||
if (this.config.postgres.maxActiveRequests
|
||||
&& this.activePostgresRequests > this.config.postgres.maxActiveRequests) {
|
||||
throw new Error("Too many active postgres requests");
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user