File tree Expand file tree Collapse file tree 1 file changed +2
-14
lines changed Expand file tree Collapse file tree 1 file changed +2
-14
lines changed Original file line number Diff line number Diff line change 1
1
import cron from "node-cron" ;
2
2
import { getConfig } from "../../utils/cache/getConfig" ;
3
- import { logger } from "../../utils/logger" ;
4
3
import { updateMinedTx } from "../tasks/updateMinedTx" ;
5
4
import { updateMinedUserOps } from "../tasks/updateMinedUserOps" ;
6
5
7
6
let task : cron . ScheduledTask ;
8
- let minedTxStarted = false ;
9
7
export const minedTxListener = async ( ) => {
10
8
const config = await getConfig ( ) ;
11
9
@@ -18,17 +16,7 @@ export const minedTxListener = async () => {
18
16
}
19
17
20
18
task = cron . schedule ( config . minedTxListenerCronSchedule , async ( ) => {
21
- if ( ! minedTxStarted ) {
22
- minedTxStarted = true ;
23
- await updateMinedTx ( ) ;
24
- await updateMinedUserOps ( ) ;
25
- minedTxStarted = false ;
26
- } else {
27
- logger ( {
28
- service : "worker" ,
29
- level : "warn" ,
30
- message : "Mined tx listener already running, skipping" ,
31
- } ) ;
32
- }
19
+ await updateMinedTx ( ) ;
20
+ await updateMinedUserOps ( ) ;
33
21
} ) ;
34
22
} ;
You can’t perform that action at this time.
0 commit comments