Enable auth-service/api-gateway on production, build their images in CI
This commit is contained in:
@@ -0,0 +1,10 @@
|
||||
import { Pool } from "pg";
|
||||
|
||||
/** One pool per process, unlike ai-service's Postgres adapter (which opens a
|
||||
* connection per call — see its own docstring on why that's a known, not-yet
|
||||
* fixed gap there). Node's `pg.Pool` makes per-request pooling the default,
|
||||
* cheap way to do this correctly from the start rather than inheriting that
|
||||
* same gap in a second language. */
|
||||
export function createPool(dsn: string): Pool {
|
||||
return new Pool({ connectionString: dsn, connectionTimeoutMillis: 5000 });
|
||||
}
|
||||
Reference in New Issue
Block a user