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 {
2034
2034
this . _debounceMempoolStat . debounce = setTimeout ( async ( ) => {
2035
2035
this . _debounceMempoolStat . running = true ;
2036
2036
this . _debounceMempoolStat . triggeredAt = null ;
2037
+ const sql = await connectPostgres ( {
2038
+ usageName : `mempool-debounce` ,
2039
+ connectionArgs : getConnectionArgs ( PgServer . primary ) ,
2040
+ connectionConfig : getConnectionConfig ( PgServer . primary ) ,
2041
+ } ) ;
2037
2042
try {
2038
- const mempoolStats = await this . sqlTransaction ( async sql => {
2043
+ const mempoolStats = await sql . begin ( async sql => {
2039
2044
return await this . getMempoolStatsInternal ( { sql } ) ;
2040
2045
} ) ;
2041
2046
this . eventEmitter . emit ( 'mempoolStatsUpdate' , mempoolStats ) ;
@@ -2052,6 +2057,7 @@ export class PgWriteStore extends PgStore {
2052
2057
logger . error ( e , `failed to run mempool stats update` ) ;
2053
2058
}
2054
2059
} finally {
2060
+ await sql . end ( ) ;
2055
2061
this . _debounceMempoolStat . running = false ;
2056
2062
this . _debounceMempoolStat . debounce = null ;
2057
2063
if ( this . _debounceMempoolStat . triggeredAt != null ) {
You can’t perform that action at this time.
0 commit comments