tangled
alpha
login
or
join now
openstatus.dev
/
openstatus
5
fork
atom
Openstatus
www.openstatus.dev
5
fork
atom
overview
issues
pulls
pipelines
🔥 seo (#491)
authored by
Thibault Le Ouay
and committed by
GitHub
2 years ago
f7feb886
d17683d0
+23
-2
2 changed files
expand all
collapse all
unified
split
apps
server
src
checker
index.ts
web
src
app
status
page.tsx
+1
-1
apps/server/src/checker/index.ts
···
78
78
return c.text("Unprocessable Entity", 422);
79
79
}
80
80
const retry = Number(c.req.header("X-CloudTasks-TaskRetryCount") || 0);
81
81
-
if (retry > 1) {
81
81
+
if (retry > 2) {
82
82
console.error(
83
83
`â›” Too many retry for ${JSON.stringify(result.data)}
84
84
)}`,
+22
-1
apps/web/src/app/status/page.tsx
···
1
1
+
import type { Metadata } from "next";
1
2
import Link from "next/link";
2
3
3
4
import {
···
11
12
import { Icons } from "@/components/icons";
12
13
import { MarketingLayout } from "@/components/layout/marketing-layout";
13
14
import { env } from "@/env";
15
15
+
import {
16
16
+
defaultMetadata,
17
17
+
ogMetadata,
18
18
+
twitterMetadata,
19
19
+
} from "../shared-metadata";
14
20
import { externalStatusArray, getClassname } from "./utils";
15
21
22
22
+
export const revalidate = 600; // revalidate every 10 min
23
23
+
24
24
+
export const metadata: Metadata = {
25
25
+
...defaultMetadata,
26
26
+
description: "Easily monitor if your external providers is working properly",
27
27
+
title: "Is my external service down?",
28
28
+
openGraph: {
29
29
+
...ogMetadata,
30
30
+
title: "Is my external service down? | OpenStatus",
31
31
+
},
32
32
+
twitter: {
33
33
+
...twitterMetadata,
34
34
+
title: "Is my external service down? | OpenStatus",
35
35
+
},
36
36
+
};
37
37
+
16
38
const ExternalStatusPage = async () => {
17
39
const res = await fetch(env.EXTERNAL_API_URL);
18
40
const data = await res.json();
19
41
const externalStatus = externalStatusArray.parse(data);
20
20
-
21
42
return (
22
43
<MarketingLayout>
23
44
<h1 className="text-foreground font-cal mb-4 text-4xl">