@xiaohhhh1/canvas-agent 0.4.12 → 0.4.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/workflow/manager.js
CHANGED
|
@@ -9,9 +9,8 @@ import { runCodexTurn, startCodexThread } from "../agent/codex.js";
|
|
|
9
9
|
import { CONFIG_DIR, ensureSiteWorkspace } from "../config.js";
|
|
10
10
|
import { logger } from "../utils/logger.js";
|
|
11
11
|
import { windowsPowerShellExecutable } from "../utils/windows.js";
|
|
12
|
-
import { FLOW_C_SCRIPT_CHUNK_MAX, FLOW_C_SCRIPT_CHUNK_SIZES } from "./constants.js";
|
|
12
|
+
import { FLOW_C_DOWNLOAD_POLL_MS, FLOW_C_SCRIPT_CHUNK_MAX, FLOW_C_SCRIPT_CHUNK_SIZES } from "./constants.js";
|
|
13
13
|
const STATE_FILE = path.join(CONFIG_DIR, "workflow-state.json");
|
|
14
|
-
const DOWNLOAD_POLL_MS = 10_000;
|
|
15
14
|
/** 本机持久化的 Flow C 控制器:脚本交给本机 Codex,视频直接落盘。 */
|
|
16
15
|
export class WorkflowManager {
|
|
17
16
|
config;
|
|
@@ -29,7 +28,7 @@ export class WorkflowManager {
|
|
|
29
28
|
if (record.status === "queued" || record.status === "running")
|
|
30
29
|
this.scheduleScript(record.id);
|
|
31
30
|
}
|
|
32
|
-
this.downloadTimer = setInterval(() => void this.syncDownloads(),
|
|
31
|
+
this.downloadTimer = setInterval(() => void this.syncDownloads(), FLOW_C_DOWNLOAD_POLL_MS);
|
|
33
32
|
this.downloadTimer.unref?.();
|
|
34
33
|
void this.syncDownloads();
|
|
35
34
|
}
|