Better progress and time estimation

This commit is contained in:
Vincent Riquer 2013-05-31 13:54:10 +02:00
parent d6130ee044
commit 9f44a1f6d2
3 changed files with 3 additions and 11 deletions

4
atom
View File

@ -544,13 +544,13 @@ do
checkworkers
cleaner
master
if (( ran ))
if (( ran - failed ))
then
currenttime=$(date +%s)
avgduration=$((
((currenttime - starttime) * 1000)
/
ran
( ran - failed )
))
secsremaining=$(( remaining * avgduration / 1000 ))
(( days =

View File

@ -10,6 +10,7 @@ cleaner() {
EOWhere
)
(( failed+=faildepends ))
(( ran+=faildepends ))
Update tasks status 2 <<<"id = $taskid"
Update tasks status 2 <<<"requires = $taskid"
echo "SELECT COUNT(*)

View File

@ -4,12 +4,3 @@ worker() {
(( debug >= 2 )) && echo "${cmd_arg[@]}" >&2
"${cmd_arg[@]}" >/dev/null
}
createworker() {
worker $1 &
workers[$1]=$!
}
destroyworker() {
dyingworker=${workers[$1]}
unset workers[$1]
wait $dyingworker
}