tasks: extract detached task lifecycle runtime (#68886) · openclaw/openclaw@0787266
mbelinky
·
2026-04-19
·
via Recent Commits to openclaw:main
22 files changed
lines changed
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change |
|---|
@@ -10,7 +10,7 @@ import {
|
1010completeTaskRunByRunId,
|
1111failTaskRunByRunId,
|
1212startTaskRunByRunId,
|
13-} from "../../tasks/task-executor.js";
|
13+} from "../../tasks/detached-task-runtime.js";
|
1414import type { DeliveryContext } from "../../utils/delivery-context.js";
|
1515import {
|
1616AcpRuntimeError,
|
|
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change |
|---|
@@ -8,7 +8,7 @@ import { enqueueSystemEvent } from "../infra/system-events.js";
|
88import { scopedHeartbeatWakeOptions } from "../routing/session-key.js";
|
99import { normalizeAssistantPhase } from "../shared/chat-message-content.js";
|
1010import { normalizeOptionalString } from "../shared/string-coerce.js";
|
11-import { recordTaskRunProgressByRunId } from "../tasks/task-executor.js";
|
11+import { recordTaskRunProgressByRunId } from "../tasks/detached-task-runtime.js";
|
1212import type { DeliveryContext } from "../utils/delivery-context.types.js";
|
1313|
1414const DEFAULT_STREAM_FLUSH_MS = 2_500;
|
|
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change |
|---|
@@ -122,7 +122,7 @@ vi.mock("../infra/heartbeat-wake.js", () => ({
|
122122areHeartbeatsEnabled: hoisted.areHeartbeatsEnabledMock,
|
123123}));
|
124124|
125-vi.mock("../tasks/task-executor.js", () => ({
|
125+vi.mock("../tasks/detached-task-runtime.js", () => ({
|
126126createRunningTaskRun: hoisted.createRunningTaskRunMock,
|
127127}));
|
128128|
|
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change |
|---|
@@ -59,7 +59,7 @@ import {
|
5959normalizeOptionalLowercaseString,
|
6060normalizeOptionalString,
|
6161} from "../shared/string-coerce.js";
|
62-import { createRunningTaskRun } from "../tasks/task-executor.js";
|
62+import { createRunningTaskRun } from "../tasks/detached-task-runtime.js";
|
6363import {
|
6464deliveryContextFromSession,
|
6565formatConversationTarget,
|
|
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change |
|---|
@@ -307,7 +307,7 @@ vi.mock("../config/sessions.js", () => ({
|
307307},
|
308308}));
|
309309|
310-vi.mock("../tasks/task-executor.js", () => ({
|
310+vi.mock("../tasks/detached-task-runtime.js", () => ({
|
311311completeTaskRunByRunId: vi.fn(),
|
312312createRunningTaskRun: vi.fn(),
|
313313failTaskRunByRunId: vi.fn(),
|
|
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change |
|---|
@@ -15,7 +15,7 @@ import {
|
1515recordTaskRunProgressByRunId,
|
1616setDetachedTaskDeliveryStatusByRunId,
|
1717startTaskRunByRunId,
|
18-} from "../../tasks/task-executor.js";
|
18+} from "../../tasks/detached-task-runtime.js";
|
1919import {
|
2020cancelTaskByIdForOwner,
|
2121findTaskByRunIdForOwner,
|
|
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change |
|---|
@@ -27,7 +27,7 @@ const browserLifecycleCleanupMocks = vi.hoisted(() => ({
|
2727cleanupBrowserSessionsForLifecycleEnd: vi.fn(async () => {}),
|
2828}));
|
2929|
30-vi.mock("../tasks/task-executor.js", () => ({
|
30+vi.mock("../tasks/detached-task-runtime.js", () => ({
|
3131completeTaskRunByRunId: taskExecutorMocks.completeTaskRunByRunId,
|
3232failTaskRunByRunId: taskExecutorMocks.failTaskRunByRunId,
|
3333setDetachedTaskDeliveryStatusByRunId: taskExecutorMocks.setDetachedTaskDeliveryStatusByRunId,
|
|
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change |
|---|
@@ -7,7 +7,7 @@ import {
|
77completeTaskRunByRunId,
|
88failTaskRunByRunId,
|
99setDetachedTaskDeliveryStatusByRunId,
|
10-} from "../tasks/task-executor.js";
|
10+} from "../tasks/detached-task-runtime.js";
|
1111import { normalizeDeliveryContext } from "../utils/delivery-context.js";
|
1212import {
|
1313captureSubagentCompletionReply,
|
|
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change |
|---|
@@ -3,7 +3,7 @@ import type { OpenClawConfig } from "../config/types.openclaw.js";
|
33import { callGateway } from "../gateway/call.js";
|
44import { createSubsystemLogger } from "../logging/subsystem.js";
|
55import { getGlobalHookRunner } from "../plugins/hook-runner-global.js";
|
6-import { createRunningTaskRun } from "../tasks/task-executor.js";
|
6+import { createRunningTaskRun } from "../tasks/detached-task-runtime.js";
|
77import { type DeliveryContext, normalizeDeliveryContext } from "../utils/delivery-context.js";
|
88import { waitForAgentRun } from "./run-wait.js";
|
99import type { ensureRuntimePluginsLoaded as ensureRuntimePluginsLoadedFn } from "./runtime-plugins.js";
|
|
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change |
|---|
@@ -10,7 +10,7 @@ import {
|
1010createRunningTaskRun,
|
1111failTaskRunByRunId,
|
1212recordTaskRunProgressByRunId,
|
13-} from "../../tasks/task-executor.js";
|
13+} from "../../tasks/detached-task-runtime.js";
|
1414import { sendMessage } from "../../tasks/task-registry-delivery-runtime.js";
|
1515import type { DeliveryContext } from "../../utils/delivery-context.js";
|
1616import { INTERNAL_MESSAGE_CHANNEL } from "../../utils/message-channel.js";
|
|
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。