shell/task: better logs

This commit is contained in:
Girish Ramakrishnan
2025-07-17 02:04:50 +02:00
parent 63053f46a8
commit c796e724aa
2 changed files with 3 additions and 1 deletions
+1 -1
View File
@@ -233,8 +233,8 @@ async function stopTask(id) {
}
async function stopAllTasks() {
debug('stopAllTasks: ignoring exit status of starttask');
const acs = Object.values(gTasks);
debug(`stopAllTasks: ${acs.length} tasks are running. sending abort signal`);
gTasks = {}; // this signals startTask() to not set completion status as "crashed"
acs.forEach(ac => ac.abort()); // cleanup all the sudos and systemd-run
const [error] = await safe(shell.sudo([ STOP_TASK_CMD, 'all' ], { cwd: paths.baseDir() }));