MCPcopy Index your code
hub / github.com/cameri/nostream / getMasterDbClient

Function getMasterDbClient

src/database/client.ts:83–92  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

81let writeClient: Knex
82
83export const getMasterDbClient = () => {
84 const logger = createLogger('database-client:get-db-client')
85 if (!writeClient) {
86 const config = getMasterConfig()
87 logger('config: %o', config)
88 writeClient = knex(config)
89 }
90
91 return writeClient
92}
93
94let readClient: Knex
95

Callers 15

shared.tsFile · 0.90
runCleanDbFunction · 0.90
runImportEventsFunction · 0.90
maintenanceWorkerFactoryFunction · 0.90
createMaintenanceServiceFunction · 0.90
workerFactoryFunction · 0.90
createPaymentsServiceFunction · 0.90

Calls 2

createLoggerFunction · 0.90
getMasterConfigFunction · 0.85

Tested by

no test coverage detected