mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-12 10:51:10 +00:00
fix(cron): add audit logging for job create/update/remove (openclaw#25090) thanks @MoerAI
Verified: - pnpm install --frozen-lockfile - pnpm check - pnpm test -- --run src/gateway/server-cron.test.ts src/gateway/server-methods/server-methods.test.ts src/gateway/protocol/cron-validators.test.ts Co-authored-by: MoerAI <26067127+MoerAI@users.noreply.github.com> Co-authored-by: Tak Hoffman <781889+Takhoffman@users.noreply.github.com>
This commit is contained in:
@@ -77,6 +77,7 @@ Docs: https://docs.openclaw.ai
|
|||||||
|
|
||||||
### Fixes
|
### Fixes
|
||||||
|
|
||||||
|
- Gateway/Cron auditability: add gateway info logs for successful cron create, update, and remove operations. (#25090) Thanks .
|
||||||
- Cron/Schedule errors: notify users when a job is auto-disabled after repeated schedule computation failures. (#29098) Thanks .
|
- Cron/Schedule errors: notify users when a job is auto-disabled after repeated schedule computation failures. (#29098) Thanks .
|
||||||
- Cron/Schedule errors: notify users when a job is auto-disabled after repeated schedule computation failures. (#29098) Thanks .
|
- Cron/Schedule errors: notify users when a job is auto-disabled after repeated schedule computation failures. (#29098) Thanks .
|
||||||
- Onboarding/Custom providers: raise default custom-provider model context window to the runtime hard minimum (16k) and auto-heal existing custom model entries below that threshold during reconfiguration, preventing immediate `Model context window too small (4096 tokens)` failures. (#21653) Thanks @r4jiv007.
|
- Onboarding/Custom providers: raise default custom-provider model context window to the runtime hard minimum (16k) and auto-heal existing custom model entries below that threshold during reconfiguration, preventing immediate `Model context window too small (4096 tokens)` failures. (#21653) Thanks @r4jiv007.
|
||||||
|
|||||||
@@ -112,6 +112,7 @@ export const cronHandlers: GatewayRequestHandlers = {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
const job = await context.cron.add(jobCreate);
|
const job = await context.cron.add(jobCreate);
|
||||||
|
context.logGateway.info("cron: job created", { jobId: job.id, schedule: jobCreate.schedule });
|
||||||
respond(true, job, undefined);
|
respond(true, job, undefined);
|
||||||
},
|
},
|
||||||
"cron.update": async ({ params, respond, context }) => {
|
"cron.update": async ({ params, respond, context }) => {
|
||||||
@@ -158,6 +159,7 @@ export const cronHandlers: GatewayRequestHandlers = {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
const job = await context.cron.update(jobId, patch);
|
const job = await context.cron.update(jobId, patch);
|
||||||
|
context.logGateway.info("cron: job updated", { jobId });
|
||||||
respond(true, job, undefined);
|
respond(true, job, undefined);
|
||||||
},
|
},
|
||||||
"cron.remove": async ({ params, respond, context }) => {
|
"cron.remove": async ({ params, respond, context }) => {
|
||||||
@@ -183,6 +185,9 @@ export const cronHandlers: GatewayRequestHandlers = {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
const result = await context.cron.remove(jobId);
|
const result = await context.cron.remove(jobId);
|
||||||
|
if (result.removed) {
|
||||||
|
context.logGateway.info("cron: job removed", { jobId });
|
||||||
|
}
|
||||||
respond(true, result, undefined);
|
respond(true, result, undefined);
|
||||||
},
|
},
|
||||||
"cron.run": async ({ params, respond, context }) => {
|
"cron.run": async ({ params, respond, context }) => {
|
||||||
|
|||||||
Reference in New Issue
Block a user