mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-06 16:50:43 +00:00
fix(cron): start isolated timeout after execution begins
This commit is contained in:
@@ -133,9 +133,10 @@ export function createDefaultIsolatedRunner(): CronServiceDeps["runIsolatedAgent
|
||||
export function createAbortAwareIsolatedRunner(summary = "late") {
|
||||
let observedAbortSignal: AbortSignal | undefined;
|
||||
const started = createDeferred<void>();
|
||||
const runIsolatedAgentJob = vi.fn(async ({ abortSignal }) => {
|
||||
const runIsolatedAgentJob = vi.fn(async ({ abortSignal, onExecutionStarted }) => {
|
||||
observedAbortSignal = abortSignal;
|
||||
started.resolve();
|
||||
onExecutionStarted?.();
|
||||
await new Promise<void>((resolve) => {
|
||||
if (!abortSignal) {
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user