|
|
@ -42,7 +42,7 @@ const MAP_TO_POWER_JOB_PARAMS_BUILDER: Record< |
|
|
|
job_name: 'set_power::server::on', |
|
|
|
job_name: 'set_power::server::on', |
|
|
|
job_title: 'job_0340', |
|
|
|
job_title: 'job_0340', |
|
|
|
}), |
|
|
|
}), |
|
|
|
stop: ({ isStopServers, runOn } = {}) => ({ |
|
|
|
stop: ({ isStopServers, uuid, runOn = uuid } = {}) => ({ |
|
|
|
job_command: `${SERVER_PATHS.usr.sbin['anvil-safe-stop'].self} --power-off${ |
|
|
|
job_command: `${SERVER_PATHS.usr.sbin['anvil-safe-stop'].self} --power-off${ |
|
|
|
isStopServers ? ' --stop-servers' : '' |
|
|
|
isStopServers ? ' --stop-servers' : '' |
|
|
|
}`,
|
|
|
|
}`,
|
|
|
@ -158,11 +158,7 @@ export const buildAnPowerHandler: ( |
|
|
|
|
|
|
|
|
|
|
|
for (const hostUuid of rows[0]) { |
|
|
|
for (const hostUuid of rows[0]) { |
|
|
|
try { |
|
|
|
try { |
|
|
|
await queuePowerJob(task, { |
|
|
|
await queuePowerJob(task, { isStopServers: true, uuid: hostUuid }); |
|
|
|
isStopServers: true, |
|
|
|
|
|
|
|
runOn: hostUuid, |
|
|
|
|
|
|
|
uuid: hostUuid, |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
} catch (error) { |
|
|
|
} catch (error) { |
|
|
|
stderr(`Failed to ${task} host ${hostUuid}; CAUSE: ${error}`); |
|
|
|
stderr(`Failed to ${task} host ${hostUuid}; CAUSE: ${error}`); |
|
|
|
|
|
|
|
|
|
|
|