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

@@ -8,8 +8,6 @@ import {
} from "./kv-store.js";
import { fetchComponentByName, escapeHtml } from "./status-fetcher.js";
import { registerInfoCommands } from "./bot-info-commands.js";
import { trackMetrics } from "./metrics.js";
/**
* Extract chatId and threadId from grammY context
*/
@@ -27,12 +25,6 @@ export async function handleTelegramWebhook(c) {
const bot = new Bot(c.env.BOT_TOKEN);
const kv = c.env.claude_status;
// Track command usage
bot.use(async (ctx, next) => {
await trackMetrics(kv, { commandsProcessed: 1 });
await next();
});
bot.command("start", async (ctx) => {
const { chatId, threadId } = getChatTarget(ctx);
await addSubscriber(kv, chatId, threadId);