mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-13 18:26:37 +00:00
Cron: suppress fallback main summary for delivery-target errors (openclaw#24074) thanks @Takhoffman
Verified: - pnpm build - pnpm check - pnpm test:macmini Co-authored-by: Takhoffman <781889+Takhoffman@users.noreply.github.com> Co-authored-by: Tak Hoffman <781889+Takhoffman@users.noreply.github.com>
This commit is contained in:
@@ -635,29 +635,26 @@ export async function runCronIsolatedAgentTurn(params: {
|
||||
// `true` means we confirmed at least one outbound send reached the target.
|
||||
// Keep this strict so timer fallback can safely decide whether to wake main.
|
||||
let delivered = skipMessagingToolDelivery;
|
||||
const failDeliveryTarget = (error: string) =>
|
||||
withRunSession({
|
||||
status: "error",
|
||||
error,
|
||||
errorKind: "delivery-target",
|
||||
summary,
|
||||
outputText,
|
||||
...telemetry,
|
||||
});
|
||||
if (deliveryRequested && !skipHeartbeatDelivery && !skipMessagingToolDelivery) {
|
||||
if (resolvedDelivery.error) {
|
||||
if (!deliveryBestEffort) {
|
||||
return withRunSession({
|
||||
status: "error",
|
||||
error: resolvedDelivery.error.message,
|
||||
summary,
|
||||
outputText,
|
||||
...telemetry,
|
||||
});
|
||||
return failDeliveryTarget(resolvedDelivery.error.message);
|
||||
}
|
||||
logWarn(`[cron:${params.job.id}] ${resolvedDelivery.error.message}`);
|
||||
return withRunSession({ status: "ok", summary, outputText, ...telemetry });
|
||||
}
|
||||
const failOrWarnMissingDeliveryField = (message: string) => {
|
||||
if (!deliveryBestEffort) {
|
||||
return withRunSession({
|
||||
status: "error",
|
||||
error: message,
|
||||
summary,
|
||||
outputText,
|
||||
...telemetry,
|
||||
});
|
||||
return failDeliveryTarget(message);
|
||||
}
|
||||
logWarn(`[cron:${params.job.id}] ${message}`);
|
||||
return withRunSession({ status: "ok", summary, outputText, ...telemetry });
|
||||
|
||||
Reference in New Issue
Block a user