chore(wh): un-debug
Build and Deploy / build-and-deploy (push) Successful in 1m42s

This commit is contained in:
2026-07-14 17:41:30 +07:00 Unverified
parent 222218feb3
commit 73f91773fb
+4 -6
View File
@@ -74,7 +74,7 @@ export function webhookMerger(app: App) {
return status(202); return status(202);
} }
log`collected ${existing}`; log.debug`collected ${existing}`;
existing.timer = setTimeout( existing.timer = setTimeout(
() => flushPending(id, url, existing), () => flushPending(id, url, existing),
@@ -90,7 +90,7 @@ export function webhookMerger(app: App) {
timer: undefined as never, timer: undefined as never,
}; };
log`collected ${state}`; log.debug`collected ${state}`;
state.timer = setTimeout(() => flushPending(id, url, state), bufferTime); state.timer = setTimeout(() => flushPending(id, url, state), bufferTime);
@@ -171,9 +171,7 @@ async function processForwardQueue() {
} }
if (recentForwardTimestamps.length >= MAX_FORWARDS_PER_WINDOW) { if (recentForwardTimestamps.length >= MAX_FORWARDS_PER_WINDOW) {
await Bun.sleep( await Bun.sleep(FORWARD_WINDOW_MS - (now - recentForwardTimestamps[0]));
FORWARD_WINDOW_MS - (now - recentForwardTimestamps[0]),
);
continue; continue;
} }
@@ -190,7 +188,7 @@ async function processForwardQueue() {
} }
async function forward(id: string, url: string, data: unknown) { async function forward(id: string, url: string, data: unknown) {
log`running ${id}`; log.debug`running ${id}`;
try { try {
const res = await fetch(url, { const res = await fetch(url, {
method: "POST", method: "POST",