Make bridge worker settings configuration via env vars

This commit is contained in:
Darren Clarke 2024-11-05 10:12:18 +01:00
parent 2489a6f891
commit 48aa89f7cf
2 changed files with 16 additions and 5 deletions

View file

@ -4,8 +4,12 @@ import type {} from "graphile-worker";
const preset: GraphileConfig.Preset = {
worker: {
connectionString: process.env.DATABASE_URL,
maxPoolSize: 10,
pollInterval: 2000,
maxPoolSize: process.env.BRIDGE_WORKER_POOL_SIZE
? parseInt(process.env.BRIDGE_WORKER_POOL_SIZE, 10)
: 10,
pollInterval: process.env.BRIDGE_WORKER_POLL_INTERVAL
? parseInt(process.env.BRIDGE_WORKER_POLL_INTERVAL, 10)
: 2000,
fileExtensions: [".ts"],
},
};