MCPcopy Create free account
hub / github.com/UsefulSoftwareCo/executor / closePostgres

Function closePostgres

apps/cloud/src/db/db.ts:103–109  ·  view source on GitHub ↗
(sql: Pick<Sql, "end">)

Source from the content-addressed store, hash-verified

101 * it respects workerd's per-request I/O rule.
102 */
103export const closePostgres = (sql: Pick<Sql, "end">): Effect.Effect<void> =>
104 Effect.ignore(
105 Effect.tryPromise({
106 try: () => sql.end({ timeout: POSTGRES_END_TIMEOUT_SECONDS }),
107 catch: (cause) => cause,
108 }),
109 );
110
111const makePostgresResource = (): DbResource => {
112 const sql = makeSql();

Callers 2

db.close.test.tsFile · 0.90
makePostgresResourceFunction · 0.85

Calls 1

endMethod · 0.80

Tested by

no test coverage detected