Skip to content

Commit 9112432

Browse files
committed
Fix redisCache import
1 parent 81a5a59 commit 9112432

File tree

2 files changed

+4
-10
lines changed

2 files changed

+4
-10
lines changed

server/src/cache/revalidator-proxy-heartbeat.ts

+4-9
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
import { networkInterfaces } from 'os';
55
import { logger } from 'srcCommon/logger';
66
import { objectToQueryString } from 'srcCommon/fetch-utils';
7-
import { redisCache } from './page-cache-handler';
7+
import { redisCache } from 'cache/page-cache-handler';
88

99
const { ENV, NODE_ENV, DOCKER_HOST_ADDRESS, REVALIDATOR_PROXY_ORIGIN, SERVICE_SECRET } =
1010
process.env;
@@ -29,7 +29,7 @@ const getPodAddress = () => {
2929
return podAddress;
3030
};
3131

32-
const getProxyLivenessUrl = (buildId: string) => {
32+
const getProxyLivenessUrl = () => {
3333
const podAddress = getPodAddress();
3434
console.log(
3535
`Redis prefixes: ${redisCache.getKeyPrefixes()} - ${redisCache.getKeyPrefixes().join(',')}`
@@ -45,7 +45,7 @@ const getProxyLivenessUrl = (buildId: string) => {
4545

4646
let didStart = false;
4747

48-
export const initRevalidatorProxyHeartbeat = (buildId: string) => {
48+
export const initRevalidatorProxyHeartbeat = () => {
4949
if (NODE_ENV === 'development') {
5050
return;
5151
}
@@ -55,17 +55,12 @@ export const initRevalidatorProxyHeartbeat = (buildId: string) => {
5555
return;
5656
}
5757

58-
const url = getProxyLivenessUrl(buildId);
59-
if (!url) {
60-
return;
61-
}
62-
6358
didStart = true;
6459

6560
logger.info('Starting heartbeat loop');
6661

6762
const heartbeatFunc = () => {
68-
const url = getProxyLivenessUrl(buildId);
63+
const url = getProxyLivenessUrl();
6964
if (!url) {
7065
logger.error('Failed to determine revalidator heartbeat url!');
7166
return;

server/src/server-setup/server-setup-dev.ts

-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import { Express } from 'express';
22
import { NextServer } from 'next/dist/server/next';
3-
import { logger } from 'srcCommon/logger';
43

54
const DEV_NAIS_DOMAIN = 'ansatt.dev.nav.no';
65
const APP_ORIGIN = process.env.APP_ORIGIN;

0 commit comments

Comments
 (0)