Skip to content

Commit

Permalink
Revert "health check fix and undo babel change, ugh"
Browse files Browse the repository at this point in the history
This reverts commit 2620a3e.
  • Loading branch information
mimecuvalo committed Mar 5, 2023
1 parent 0687f32 commit b2d3d3f
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 9 deletions.
8 changes: 2 additions & 6 deletions app/clientHealthCheck.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ async function runCheck() {
'/api/client-health-check?' +
new URLSearchParams({
buildId: process.env.BUILD_ID || '',
commitSHA: process.env.NEXT_PUBLIC_VERCEL_GIT_COMMIT_SHA || '',
commitSHA: process.env.NEXT_PUBLIC_VERCEL_GITHUB_COMMIT_SHA || '',
});
const response = await fetch(url);
const data = await response.text();
Expand All @@ -21,10 +21,6 @@ async function runCheck() {
// tell the App to do a hard navigation at the next opportunity.
}

let checkIntervalId: NodeJS.Timeout;
export default function clientHealthCheck() {
if (checkIntervalId) {
clearInterval(checkIntervalId);
}
checkIntervalId = setInterval(runCheck, 5 * 60 * 1000 /* every 5 min */);
setInterval(runCheck, 5 * 60 * 1000 /* every 5 min */);
}
13 changes: 13 additions & 0 deletions for-i18n-later-babel.config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"presets": ["next/babel"],
"plugins": [
[
"formatjs",
{
"idInterpolationPattern": "[md5:contenthash:hex:10]",
"additionalComponentNames": ["F"],
"ast": true
}
]
]
}
4 changes: 1 addition & 3 deletions next.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -96,9 +96,7 @@ const nextConfig = {
config.plugins.push(
new webpack.DefinePlugin({
'process.env.BUILD_ID': JSON.stringify(buildId),
'process.env.NEXT_PUBLIC_VERCEL_GIT_COMMIT_SHA': JSON.stringify(
process.env.VERCEL_GIT_COMMIT_SHA || '-missing-'
),
'process.env.NEXT_PUBLIC_VERCEL_GITHUB_COMMIT_SHA': process.env.VERCEL_GITHUB_COMMIT_SHA,
})
);

Expand Down

0 comments on commit b2d3d3f

Please sign in to comment.