修复运行命令api任务日志路径

This commit is contained in:
whyour
2023-05-04 10:25:04 +08:00
parent d8ae039b92
commit c84908d7fa
6 changed files with 34 additions and 21 deletions
+8 -2
View File
@@ -177,11 +177,17 @@ export default class SystemService {
}
}
public async run({ command }: { command: string }, callback: TaskCallbacks) {
public async run(
{ command, logPath }: { command: string; logPath: string },
callback: TaskCallbacks,
) {
if (!command.startsWith(TASK_COMMAND)) {
command = `${TASK_COMMAND} ${command}`;
}
this.scheduleService.runTask(`real_time=true ${command}`, callback);
this.scheduleService.runTask(
`real_log_path=${logPath} real_time=true ${command}`,
callback,
);
}
public async stop({ command }: { command: string }) {