This commit is contained in:
+4
-6
@@ -74,7 +74,7 @@ export function webhookMerger(app: App) {
|
||||
return status(202);
|
||||
}
|
||||
|
||||
log`collected ${existing}`;
|
||||
log.debug`collected ${existing}`;
|
||||
|
||||
existing.timer = setTimeout(
|
||||
() => flushPending(id, url, existing),
|
||||
@@ -90,7 +90,7 @@ export function webhookMerger(app: App) {
|
||||
timer: undefined as never,
|
||||
};
|
||||
|
||||
log`collected ${state}`;
|
||||
log.debug`collected ${state}`;
|
||||
|
||||
state.timer = setTimeout(() => flushPending(id, url, state), bufferTime);
|
||||
|
||||
@@ -171,9 +171,7 @@ async function processForwardQueue() {
|
||||
}
|
||||
|
||||
if (recentForwardTimestamps.length >= MAX_FORWARDS_PER_WINDOW) {
|
||||
await Bun.sleep(
|
||||
FORWARD_WINDOW_MS - (now - recentForwardTimestamps[0]),
|
||||
);
|
||||
await Bun.sleep(FORWARD_WINDOW_MS - (now - recentForwardTimestamps[0]));
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -190,7 +188,7 @@ async function processForwardQueue() {
|
||||
}
|
||||
|
||||
async function forward(id: string, url: string, data: unknown) {
|
||||
log`running ${id}`;
|
||||
log.debug`running ${id}`;
|
||||
try {
|
||||
const res = await fetch(url, {
|
||||
method: "POST",
|
||||
|
||||
Reference in New Issue
Block a user