mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-11 21:53:43 +00:00
fix(cron): add retry policy for one-shot jobs on transient errors (#24355) (openclaw#24435) thanks @hugenshen
Verified: - pnpm install --frozen-lockfile - pnpm check - pnpm test -- --run src/cron/service.issue-regressions.test.ts src/config/config-misc.test.ts Co-authored-by: hugenshen <16300669+hugenshen@users.noreply.github.com> Co-authored-by: Tak Hoffman <781889+Takhoffman@users.noreply.github.com>
This commit is contained in:
@@ -193,6 +193,19 @@ describe("cron webhook schema", () => {
|
||||
|
||||
expect(res.success).toBe(false);
|
||||
});
|
||||
|
||||
it("accepts cron.retry config", () => {
|
||||
const res = OpenClawSchema.safeParse({
|
||||
cron: {
|
||||
retry: {
|
||||
maxAttempts: 5,
|
||||
backoffMs: [60000, 120000, 300000],
|
||||
retryOn: ["rate_limit", "network"],
|
||||
},
|
||||
},
|
||||
});
|
||||
expect(res.success).toBe(true);
|
||||
});
|
||||
});
|
||||
|
||||
describe("broadcast", () => {
|
||||
|
||||
Reference in New Issue
Block a user