File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed
Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -2034,8 +2034,13 @@ export class PgWriteStore extends PgStore {
20342034 this . _debounceMempoolStat . debounce = setTimeout ( async ( ) => {
20352035 this . _debounceMempoolStat . running = true ;
20362036 this . _debounceMempoolStat . triggeredAt = null ;
2037+ const sql = await connectPostgres ( {
2038+ usageName : `mempool-debounce` ,
2039+ connectionArgs : getConnectionArgs ( PgServer . primary ) ,
2040+ connectionConfig : getConnectionConfig ( PgServer . primary ) ,
2041+ } ) ;
20372042 try {
2038- const mempoolStats = await this . sqlTransaction ( async sql => {
2043+ const mempoolStats = await sql . begin ( async sql => {
20392044 return await this . getMempoolStatsInternal ( { sql } ) ;
20402045 } ) ;
20412046 this . eventEmitter . emit ( 'mempoolStatsUpdate' , mempoolStats ) ;
@@ -2052,6 +2057,7 @@ export class PgWriteStore extends PgStore {
20522057 logger . error ( e , `failed to run mempool stats update` ) ;
20532058 }
20542059 } finally {
2060+ await sql . end ( ) ;
20552061 this . _debounceMempoolStat . running = false ;
20562062 this . _debounceMempoolStat . debounce = null ;
20572063 if ( this . _debounceMempoolStat . triggeredAt != null ) {
You can’t perform that action at this time.
0 commit comments