4
4
import { networkInterfaces } from 'os' ;
5
5
import { logger } from 'srcCommon/logger' ;
6
6
import { objectToQueryString } from 'srcCommon/fetch-utils' ;
7
- import { redisCache } from '. /page-cache-handler' ;
7
+ import { redisCache } from 'cache /page-cache-handler' ;
8
8
9
9
const { ENV , NODE_ENV , DOCKER_HOST_ADDRESS , REVALIDATOR_PROXY_ORIGIN , SERVICE_SECRET } =
10
10
process . env ;
@@ -29,7 +29,7 @@ const getPodAddress = () => {
29
29
return podAddress ;
30
30
} ;
31
31
32
- const getProxyLivenessUrl = ( buildId : string ) => {
32
+ const getProxyLivenessUrl = ( ) => {
33
33
const podAddress = getPodAddress ( ) ;
34
34
console . log (
35
35
`Redis prefixes: ${ redisCache . getKeyPrefixes ( ) } - ${ redisCache . getKeyPrefixes ( ) . join ( ',' ) } `
@@ -45,7 +45,7 @@ const getProxyLivenessUrl = (buildId: string) => {
45
45
46
46
let didStart = false ;
47
47
48
- export const initRevalidatorProxyHeartbeat = ( buildId : string ) => {
48
+ export const initRevalidatorProxyHeartbeat = ( ) => {
49
49
if ( NODE_ENV === 'development' ) {
50
50
return ;
51
51
}
@@ -55,17 +55,12 @@ export const initRevalidatorProxyHeartbeat = (buildId: string) => {
55
55
return ;
56
56
}
57
57
58
- const url = getProxyLivenessUrl ( buildId ) ;
59
- if ( ! url ) {
60
- return ;
61
- }
62
-
63
58
didStart = true ;
64
59
65
60
logger . info ( 'Starting heartbeat loop' ) ;
66
61
67
62
const heartbeatFunc = ( ) => {
68
- const url = getProxyLivenessUrl ( buildId ) ;
63
+ const url = getProxyLivenessUrl ( ) ;
69
64
if ( ! url ) {
70
65
logger . error ( 'Failed to determine revalidator heartbeat url!' ) ;
71
66
return ;
0 commit comments