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 @@ -14,12 +14,18 @@ const regIpV6 = /^(([\da-fA-F]+)?:)+\/\d+/;
14
14
15
15
const internalIpRanges = {
16
16
17
- interval_timeout : 1000 * 60 * 60 * 6 , // 6 hours
17
+ interval_timeout : 1000 * 60 * 60 * 24 , // 24 hours
18
18
interval : null ,
19
19
interval_processing : false ,
20
20
iteration_count : 0 ,
21
21
22
22
initTimer : ( ) => {
23
+ let timerExecutedEvery = 24 ;
24
+ if ( typeof process . env . IPRANGE_RENEWAL_INTERVAL_IN_HOURS !== 'undefined' ) {
25
+ internalIpRanges . interval_timeout = process . env . IPRANGE_RENEWAL_INTERVAL_IN_HOURS * 1000 * 60 * 60 ;
26
+ timerExecutedEvery = process . env . IPRANGE_RENEWAL_INTERVAL_IN_HOURS ;
27
+ }
28
+ logger . info ( 'Timer for ipranges renewal will be executed every ' + timerExecutedEvery + ' hour(s)' ) ;
23
29
logger . info ( 'IP Ranges Renewal Timer initialized' ) ;
24
30
internalIpRanges . interval = setInterval ( internalIpRanges . fetch , internalIpRanges . interval_timeout ) ;
25
31
} ,
You can’t perform that action at this time.
0 commit comments