MCPcopy Index your code
hub / github.com/subquery/subql / setupKeepAlive

Method setupKeepAlive

packages/query/src/graphql/graphql.module.ts:119–131  ·  view source on GitHub ↗
(pgClient: PoolClient)

Source from the content-addressed store, hash-verified

117 }
118
119 private setupKeepAlive(pgClient: PoolClient) {
120 const interval = argv['sl-keep-alive-interval'] || 180000;
121 logger.info(`Setup PG Pool keep alive. interval ${interval} ms`);
122 setInterval(() => {
123 void (async () => {
124 try {
125 await pgClient.query('SELECT 1');
126 } catch (err) {
127 getLogger('db').error('Schema listener client keep-alive query failed: ', err);
128 }
129 })();
130 }, interval);
131 }
132
133 private async createServer() {
134 const app = this.httpAdapterHost.httpAdapter.getInstance();

Callers 1

createServerMethod · 0.95

Calls 2

getLoggerFunction · 0.90
errorMethod · 0.45

Tested by

no test coverage detected