mirror of
https://github.com/ajayyy/SponsorBlockServer.git
synced 2024-11-10 01:02:30 +01:00
Only limit connections for reads
This commit is contained in:
parent
d3d53d0758
commit
a417299d3e
1 changed files with 1 additions and 1 deletions
|
@ -105,7 +105,7 @@ export class Postgres implements IDatabase {
|
|||
|
||||
Logger.debug(`prepare (postgres): type: ${type}, query: ${query}, params: ${params}`);
|
||||
|
||||
if (this.config.postgres.maxActiveRequests
|
||||
if (this.config.postgres.maxActiveRequests && this.isReadQuery(type)
|
||||
&& this.activePostgresRequests > this.config.postgres.maxActiveRequests) {
|
||||
throw new Error("Too many active postgres requests");
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue