atom: commit every 60 seconds when transcoding
This commit is contained in:
parent
8b4c7e51ce
commit
33120e8be3
8
atom
8
atom
@ -697,8 +697,15 @@ starttime=$concurrencychange
|
|||||||
taskcount=$count
|
taskcount=$count
|
||||||
remaining=$taskcount
|
remaining=$taskcount
|
||||||
failed=0
|
failed=0
|
||||||
|
echo 'BEGIN TRANSACTION;' >&3
|
||||||
|
committime=$(date +%s)
|
||||||
while (( (remaining || ${#workers[@]}) && ! quit ))
|
while (( (remaining || ${#workers[@]}) && ! quit ))
|
||||||
do
|
do
|
||||||
|
if (( $(date +%s) - committime >= 60 ))
|
||||||
|
then
|
||||||
|
echo $'COMMIT;\nBEGIN TRANSACTION;' >&3
|
||||||
|
committime=$(date +%s)
|
||||||
|
fi
|
||||||
read humanload garbage < /proc/loadavg
|
read humanload garbage < /proc/loadavg
|
||||||
load=${humanload%.*}
|
load=${humanload%.*}
|
||||||
if (( fixed_workers ))
|
if (( fixed_workers ))
|
||||||
@ -799,6 +806,7 @@ do
|
|||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
echo 'COMMIT;' >&3
|
||||||
unset count
|
unset count
|
||||||
|
|
||||||
endtime=$(date +%s)
|
endtime=$(date +%s)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user