通过oss接口生成文件列表。

master
Qihua Pan 3 years ago
parent b2e8639479
commit 21ecdfe138
  1. 9
      pixiv/pixiv.sh

@ -67,7 +67,7 @@ function DeleteMultipleObjects(){
temp_file=DeleteMultipleObjects.json temp_file=DeleteMultipleObjects.json
while true while true
do do
curl -v -d "AccessKeyId=$AccessKeyId&AccessKeySecret=$AccessKeySecret&host=$Host&bucketname=$bucketname&max=50" $deleteApi > $temp_file curl -v -o $temp_file -d "AccessKeyId=$AccessKeyId&AccessKeySecret=$AccessKeySecret&host=$Host&bucketname=$bucketname&max=50" $deleteApi/aliyun_oss
cat $temp_file cat $temp_file
count=`cat $temp_file|jq -r .count` count=`cat $temp_file|jq -r .count`
echo "剩余需要清理文件个数:$count" echo "剩余需要清理文件个数:$count"
@ -76,14 +76,9 @@ function DeleteMultipleObjects(){
echo "delete finish" echo "delete finish"
break break
fi fi
for item in `cat $temp_file|jq -r ".delete_files[]"`
do
sed -i "/$item/g" $db_file
done
sed -i "/^\s*$/d" $db_file
sleep 1m
done done
rm -f $temp_file rm -f $temp_file
curl -v -o $db_file -d "AccessKeyId=$AccessKeyId&AccessKeySecret=$AccessKeySecret&host=$Host&bucketname=$bucketname" $deleteApi/list_file
} }

Loading…
Cancel
Save