diff --git a/atom b/atom index 6439553..993c32c 100755 --- a/atom +++ b/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)