Skip to content

Open-source status page, incident response and uptime monitoring

feat: new temp task

mxkaske39ca047262fc
diff --git a/apps/web/src/app/api/checker/cron/_cron.ts b/apps/web/src/app/api/checker/cron/_cron.ts
index 959809d9b..8132d4d56 100644
--- a/apps/web/src/app/api/checker/cron/_cron.ts
+++ b/apps/web/src/app/api/checker/cron/_cron.ts
@@ -80,7 +80,7 @@ export const cron = async ({
Authorization: `Basic ${env.CRON_SECRET}`,
},
httpMethod: "POST",
- url: "https://checker.openstatus.dev/",
+ url: "https://api.openstatus.dev/checkerV2",
body: Buffer.from(JSON.stringify(payload)).toString("base64"),
},
};
@@ -88,6 +88,26 @@ export const cron = async ({
const [response] = await client.createTask(request);
allResult.push(response);
+
+ /**
+ * Pushing to our Golang endpoint
+ */
+ const tempTask: google.cloud.tasks.v2beta3.ITask = {
+ httpRequest: {
+ headers: {
+ "Content-Type": "application/json", // Set content type to ensure compatibility your application's request parsing
+ ...(region !== "auto" && { "fly-prefer-region": region }), // Specify the region you want the request to be sent to
+ Authorization: `Basic ${env.CRON_SECRET}`,
+ },
+ httpMethod: "POST",
+ url: "https://checker.openstatus.dev/",
+ body: Buffer.from(JSON.stringify(payload)).toString("base64"),
+ },
+ };
+ const tempRequest = { parent: parent, task: tempTask };
+ const [tempResponse] = await client.createTask(tempRequest);
+
+ allResult.push(tempResponse);
}
}
await Promise.all(allResult);