mirror of
https://github.com/LibreELEC/LibreELEC.tv.git
synced 2025-07-28 13:16:41 +00:00
config/functions: eliminate unecessary dashboard flock()
This commit is contained in:
parent
7e99243489
commit
b272bcb999
@ -1295,9 +1295,11 @@ pkg_lock_status() {
|
|||||||
[ -n "${msg}" ] && line+=" (${msg})"
|
[ -n "${msg}" ] && line+=" (${msg})"
|
||||||
|
|
||||||
echo "${line}" >>"${THREAD_CONTROL}/history"
|
echo "${line}" >>"${THREAD_CONTROL}/history"
|
||||||
) 94>"${THREAD_CONTROL}/locks/.history"
|
|
||||||
|
|
||||||
[ "${DASHBOARD}" != "no" ] && update_dashboard "${status}" "${pkg}" "${task}" "${msg}"
|
if [ "${DASHBOARD}" != "no" ]; then
|
||||||
|
update_dashboard "${status}" "${pkg}" "${task}" "${msg}"
|
||||||
|
fi
|
||||||
|
) 94>"${THREAD_CONTROL}/locks/.history"
|
||||||
|
|
||||||
if [ "${status}" = "LOCKED" ]; then
|
if [ "${status}" = "LOCKED" ]; then
|
||||||
echo "${PARALLEL_SEQ}" > "${THREAD_CONTROL}/locks/${pkg}.${task}.failed"
|
echo "${PARALLEL_SEQ}" > "${THREAD_CONTROL}/locks/${pkg}.${task}.failed"
|
||||||
@ -1314,9 +1316,6 @@ update_dashboard() {
|
|||||||
local line sedline preamble num elapsed projdevarch
|
local line sedline preamble num elapsed projdevarch
|
||||||
local boldred boldgreen boldyellow endcolor
|
local boldred boldgreen boldyellow endcolor
|
||||||
|
|
||||||
(
|
|
||||||
flock --exclusive 97
|
|
||||||
|
|
||||||
[ -n "${MTJOBID}" ] && sedline=$((MTJOBID + 2)) || sedline=1
|
[ -n "${MTJOBID}" ] && sedline=$((MTJOBID + 2)) || sedline=1
|
||||||
|
|
||||||
num=$(cat "${THREAD_CONTROL}/status" | wc -l)
|
num=$(cat "${THREAD_CONTROL}/status" | wc -l)
|
||||||
@ -1354,7 +1353,6 @@ update_dashboard() {
|
|||||||
[ -n "${msg}" ] && line+=" ${msg//\//\\/}"
|
[ -n "${msg}" ] && line+=" ${msg//\//\\/}"
|
||||||
sed -e "1s/.*/${preamble}/;${sedline}s/.*/${line}/" -i "${THREAD_CONTROL}/status"
|
sed -e "1s/.*/${preamble}/;${sedline}s/.*/${line}/" -i "${THREAD_CONTROL}/status"
|
||||||
fi
|
fi
|
||||||
) 97>"${THREAD_CONTROL}/locks/.status"
|
|
||||||
}
|
}
|
||||||
|
|
||||||
# Thread concurrency helpers to avoid concurrency issues with some code,
|
# Thread concurrency helpers to avoid concurrency issues with some code,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user