Commit 23e48b6 1 parent 3aa2b5b commit 23e48b6 Copy full SHA for 23e48b6
File tree 1 file changed +22
-22
lines changed
1 file changed +22
-22
lines changed Original file line number Diff line number Diff line change @@ -85,28 +85,28 @@ const watch = async () => {
85
85
newJobSetting = await db . Setting . findOne ( { meta_key : 'push_new_job' } )
86
86
}
87
87
88
- if ( String ( maxBlockNum ) === String ( minBlockCrawl ) ) {
89
- isOver2Minutes += 0.5 // Similar to 0.5 second
90
-
91
- // send notification after 2 minutes
92
- if ( isOver2Minutes >= 240 && isSend ) {
93
- let slack = require ( 'slack-notify' ) ( config . get ( 'SLACK_WEBHOOK_URL' ) )
94
- logger . info ( 'Slack Notification - There is no new block in last 2 minutes' )
95
- await slack . send ( {
96
- attachments : [
97
- {
98
- author_name : 'Slack Bot' ,
99
- title : ':warning: WARNING' ,
100
- color : 'danger' ,
101
- text : '<!channel> There is no new block in last 2 minutes'
102
- }
103
- ]
104
- } )
105
- isSend = false
106
- }
107
- logger . debug ( 'Sleep 0.5 seconds' )
108
- await sleep ( 500 )
109
- }
88
+ // if (String(maxBlockNum) === String(minBlockCrawl)) {
89
+ // isOver2Minutes += 0.5 // Similar to 0.5 second
90
+ //
91
+ // // send notification after 2 minutes
92
+ // if (isOver2Minutes >= 240 && isSend) {
93
+ // let slack = require('slack-notify')(config.get('SLACK_WEBHOOK_URL'))
94
+ // logger.info('Slack Notification - There is no new block in last 2 minutes')
95
+ // await slack.send({
96
+ // attachments: [
97
+ // {
98
+ // author_name: 'Slack Bot',
99
+ // title: ':warning: WARNING',
100
+ // color: 'danger',
101
+ // text: '<!channel> There is no new block in last 2 minutes'
102
+ // }
103
+ // ]
104
+ // })
105
+ // isSend = false
106
+ // }
107
+ // logger.debug('Sleep 0.5 seconds')
108
+ // await sleep(500)
109
+ // }
110
110
}
111
111
}
112
112
} catch ( e ) {
You can’t perform that action at this time.
0 commit comments