COMMIT every 1000 files
This commit is contained in:
parent
807e0c961d
commit
0238b0a449
12
atom
12
atom
@ -571,6 +571,12 @@ getFiles() {
|
|||||||
filename $filename
|
filename $filename
|
||||||
EOWhere
|
EOWhere
|
||||||
(( ++new ))
|
(( ++new ))
|
||||||
|
if (( new % 1000 == 0 ))
|
||||||
|
then
|
||||||
|
echo 'COMMIT;BEGIN TRANSACTION;' >&3
|
||||||
|
(( debug )) \
|
||||||
|
&& echo -e "\rIdentified $new files, committing..."
|
||||||
|
fi
|
||||||
else
|
else
|
||||||
Update source_files last_seen $scantime <<-EOWhere
|
Update source_files last_seen $scantime <<-EOWhere
|
||||||
filename = $filename
|
filename = $filename
|
||||||
@ -1034,6 +1040,12 @@ do
|
|||||||
mimetype=${rest%%|*}
|
mimetype=${rest%%|*}
|
||||||
filename=${rest#*|}
|
filename=${rest#*|}
|
||||||
echo -en "\rTags: $((++count*100/filecount))%"
|
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
|
if getTags
|
||||||
then
|
then
|
||||||
Update tags \
|
Update tags \
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user