mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-08 17:48:26 +00:00
refactor(daemon): share service description resolve
This commit is contained in:
@@ -2,7 +2,7 @@ import fs from "node:fs/promises";
|
||||
import path from "node:path";
|
||||
import type { GatewayServiceRuntime } from "./service-runtime.js";
|
||||
import { splitArgsPreservingQuotes } from "./arg-split.js";
|
||||
import { formatGatewayServiceDescription, resolveGatewayWindowsTaskName } from "./constants.js";
|
||||
import { resolveGatewayServiceDescription, resolveGatewayWindowsTaskName } from "./constants.js";
|
||||
import { formatLine } from "./output.js";
|
||||
import { resolveGatewayStateDir } from "./paths.js";
|
||||
import { parseKeyValueOutput } from "./runtime-parse.js";
|
||||
@@ -190,12 +190,7 @@ export async function installScheduledTask({
|
||||
await assertSchtasksAvailable();
|
||||
const scriptPath = resolveTaskScriptPath(env);
|
||||
await fs.mkdir(path.dirname(scriptPath), { recursive: true });
|
||||
const taskDescription =
|
||||
description ??
|
||||
formatGatewayServiceDescription({
|
||||
profile: env.OPENCLAW_PROFILE,
|
||||
version: environment?.OPENCLAW_SERVICE_VERSION ?? env.OPENCLAW_SERVICE_VERSION,
|
||||
});
|
||||
const taskDescription = resolveGatewayServiceDescription({ env, environment, description });
|
||||
const script = buildTaskScript({
|
||||
description: taskDescription,
|
||||
programArguments,
|
||||
|
||||
Reference in New Issue
Block a user