Fix psu tasks:healthy action output

when an error occurs
This commit is contained in:
Tortue Torche 2021-09-14 13:44:20 +02:00
parent 54b0f3854a
commit 457aba0687
2 changed files with 8 additions and 1 deletions

View File

@ -11,6 +11,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Fixed
- Running concurrently `psu` commands should work now, by creating unique temporary file names
- Fix `psu tasks:healthy` action output, when an error occurs
## [1.2.0] - 2021-09-14
### Added

8
psu
View File

@ -1234,9 +1234,15 @@ tasks() {
tasks_healthy() {
local tasks_running
tasks_running=$(tasks 'running' 'running')
if [ $? -ne 0 ]; then
exit 0
fi
local tasks_job_complete
tasks_job_complete=$(tasks 'shutdown' 'complete')
echo "$(echo "${tasks_running}${tasks_job_complete}" | jq -sjc 'add | unique_by(.ID)')"
if [ $? -ne 0 ]; then
exit 0
fi
echo "${tasks_running}${tasks_job_complete}" | jq -sjc 'add | unique_by(.ID)'
}
services() {