Compare commits
No commits in common. "9ecb7e5f35359a9acaa7d1ec39a86765020996b3" and "ba5d61c71e1435ad6b3a93797344a51d1fc82522" have entirely different histories.
9ecb7e5f35
...
ba5d61c71e
@ -81,17 +81,8 @@ updateTaskFields() {
|
|||||||
jqExpr="$jqExpr | .$key = \$$key"
|
jqExpr="$jqExpr | .$key = \$$key"
|
||||||
done
|
done
|
||||||
|
|
||||||
# The processor runs as the manager user, which CANNOT create files in the
|
|
||||||
# docker-install-owned TASK_DIR. A plain `jq … > "$tmp"` redirect therefore
|
|
||||||
# failed silently, so neither `status: running` nor `status: completed` was
|
|
||||||
# ever written and the task was reprocessed forever. Capture jq's output and
|
|
||||||
# write the temp via runFileWrite (the privileged helper, like writeAtomic),
|
|
||||||
# then chmod + atomic mv as before.
|
|
||||||
local updated
|
|
||||||
updated=$(jq "${jqArgs[@]}" "$jqExpr" "$taskFile" 2>/dev/null) || return 1
|
|
||||||
[[ -z "$updated" ]] && return 1
|
|
||||||
local tmp="${taskFile}.tmp.$$"
|
local tmp="${taskFile}.tmp.$$"
|
||||||
printf '%s' "$updated" | runFileWrite "$tmp" \
|
jq "${jqArgs[@]}" "$jqExpr" "$taskFile" 2>/dev/null > "$tmp" \
|
||||||
&& runFileOp chmod 644 "$tmp" 2>/dev/null \
|
&& runFileOp chmod 644 "$tmp" 2>/dev/null \
|
||||||
&& runFileOp mv "$tmp" "$taskFile"
|
&& runFileOp mv "$tmp" "$taskFile"
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user