Limit db connections globally for the process, not per call
Signed-off-by: Gustaf Räntilä <g.rantila@gmail.com>
This commit is contained in:
@@ -29,6 +29,8 @@ const migrationsDir = resolvePackagePath(
|
||||
'migrations',
|
||||
);
|
||||
|
||||
const dbLimit = pLimit(10);
|
||||
|
||||
/**
|
||||
* @public
|
||||
*/
|
||||
@@ -111,8 +113,6 @@ export class DatabaseUserSettingsStore implements UserSettingsStore {
|
||||
keys.add(item.key);
|
||||
}
|
||||
|
||||
const dbLimit = pLimit(10);
|
||||
|
||||
// Chunks the keys per bucket to avoid hitting SQL parameter limits
|
||||
const chunkKeys = (keys: Array<string>, size: number): string[][] => {
|
||||
const chunks = [];
|
||||
|
||||
Reference in New Issue
Block a user