From 0238b0a4493c8e5b30df62416ed1a84fad84f5fb Mon Sep 17 00:00:00 2001 From: Vincent Riquer Date: Fri, 8 Mar 2013 13:00:28 +0100 Subject: [PATCH] COMMIT every 1000 files --- atom | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/atom b/atom index 6570161..7305772 100755 --- a/atom +++ b/atom @@ -571,6 +571,12 @@ getFiles() { filename $filename EOWhere (( ++new )) + if (( new % 1000 == 0 )) + then + echo 'COMMIT;BEGIN TRANSACTION;' >&3 + (( debug )) \ + && echo -e "\rIdentified $new files, committing..." + fi else Update source_files last_seen $scantime <<-EOWhere filename = $filename @@ -1034,6 +1040,12 @@ do mimetype=${rest%%|*} filename=${rest#*|} echo -en "\rTags: $((++count*100/filecount))%" + if (( count % 1000 == 0 )) + then + echo 'COMMIT;BEGIN TRANSACTION;' >&3 + (( debug )) \ + && echo " $count files read, committing..." + fi if getTags then Update tags \