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
|
||||
remaining=$taskcount
|
||||
failed=0
|
||||
echo 'BEGIN TRANSACTION;' >&3
|
||||
committime=$(date +%s)
|
||||
while (( (remaining || ${#workers[@]}) && ! quit ))
|
||||
do
|
||||
if (( $(date +%s) - committime >= 60 ))
|
||||
then
|
||||
echo $'COMMIT;\nBEGIN TRANSACTION;' >&3
|
||||
committime=$(date +%s)
|
||||
fi
|
||||
read humanload garbage < /proc/loadavg
|
||||
load=${humanload%.*}
|
||||
if (( fixed_workers ))
|
||||
@ -799,6 +806,7 @@ do
|
||||
fi
|
||||
fi
|
||||
done
|
||||
echo 'COMMIT;' >&3
|
||||
unset count
|
||||
|
||||
endtime=$(date +%s)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user