COMMIT every 1000 files
This commit is contained in:
parent
807e0c961d
commit
0238b0a449
12
atom
12
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 \
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user