Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions src/selfhost/queue-common.ts
Original file line number Diff line number Diff line change
Expand Up @@ -689,10 +689,6 @@ export function githubRateLimitRetryDelayMs(
return null;
}

export function nonConsumingRetryDelayMs(error: unknown): number | null {
return githubRateLimitRetryDelayMs(error);
}

export function consumingRetryDelayMs(
error: unknown,
defaultDelayMs: number,
Expand Down
20 changes: 0 additions & 20 deletions test/unit/selfhost-queue-common.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ import {
jobClaimSortKey,
jobPriority,
matchesGitHubRateLimitAdmissionTarget,
nonConsumingRetryDelayMs,
parsePositiveIntEnv,
queueBackgroundConcurrency,
queueDeadLetterAutoRetryMaxExtraAttempts,
Expand Down Expand Up @@ -1481,25 +1480,6 @@ describe("self-host queue common helpers", () => {
).toBeNull();
});

it("keeps only GitHub rate limits on the non-consuming retry path", () => {
expect(nonConsumingRetryDelayMs(new Error("boom"))).toBeNull();
expect(
nonConsumingRetryDelayMs({
status: 429,
response: { headers: new Headers({ "retry-after": "2" }) },
}),
).toBe(2_000);
expect(
nonConsumingRetryDelayMs(
new RetryableJobError("AI review pending", {
retryAfterMs: 1234,
retryKind: "ai_review_public_summary_missing",
}),
),
).toBeNull();
expect(nonConsumingRetryDelayMs(new Error("openai rate limit"))).toBeNull();
});

it("uses RetryableJobError delays on the bounded consuming retry path", () => {
expect(consumingRetryDelayMs(new Error("boom"), 77)).toBe(77);
expect(
Expand Down
Loading