refactor: replace metrics with console.log, remove HMAC

Statuspage doesn't support HMAC signatures - removed all HMAC code.
Replaced KV-based metrics with simple console.log for CF Workers logs.
Queue consumer logs batch summary (sent/failed/retried/removed).
This commit is contained in:
2026-04-09 00:52:41 +07:00
parent d78e761731
commit 392fecf350
8 changed files with 3 additions and 127 deletions

View File

@@ -1,7 +1,5 @@
import { getSubscribersByType } from "./kv-store.js";
import { humanizeStatus, escapeHtml } from "./status-fetcher.js";
import { trackMetrics } from "./metrics.js";
/**
* Timing-safe string comparison
*/
@@ -93,11 +91,5 @@ export async function handleStatuspageWebhook(c) {
console.log(`Enqueued ${messages.length} messages for ${category}${componentName ? `:${componentName}` : ""}`);
await trackMetrics(c.env.claude_status, {
webhooksReceived: 1,
messagesEnqueued: messages.length,
lastWebhookAt: new Date().toISOString(),
});
return c.text("OK", 200);
}