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:
Gustaf Räntilä
2026-02-03 16:22:39 +01:00
parent c406c94b99
commit 5a149b0bcf
@@ -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 = [];