File tree Expand file tree Collapse file tree 1 file changed +1
-4
lines changed
apps/cover-updater/scripts Expand file tree Collapse file tree 1 file changed +1
-4
lines changed Original file line number Diff line number Diff line change @@ -85,7 +85,6 @@ processImage() {
8585 local path=$2
8686 local thread_id=$3
8787
88- output=${DOWNLOAD_DIR_TMP} /cover_${id} .jpg
8988 path=$( echo ${path} | tr -d ' \r' | tr -d ' \n' )
9089 log=" \n[Thread $thread_id ] id: $id , path: $path \n"
9190
@@ -94,20 +93,18 @@ processImage() {
9493 else
9594 log=${log} " [Thread $thread_id ] Image doesn't exist locally: ${path} \n"
9695 addQueryToSqlList ${thread_id} " $( getCoverLogInsertErrorQuery ${id} " Failed to download" ) "
97- rm -f ${output}
9896 echo -e ${log}
9997 return
10098 fi
10199
102- PASTEC_OUTPUT=$( curl -s -S -X PUT --data-binary @${output } http://${PASTEC_HOST} :${PASTEC_PORT} /index/images/${id} )
100+ PASTEC_OUTPUT=$( curl -s -S -X PUT --data-binary @${path } http://${PASTEC_HOST} :${PASTEC_PORT} /index/images/${id} )
103101 if [[ ${PASTEC_OUTPUT} == * " IMAGE_ADDED" * ]]; then
104102 log=${log} " [Thread $thread_id ] Imported\n"
105103 addQueryToSqlList ${thread_id} " $( getCoverLogInsertSuccessQuery ${id} ) "
106104 else
107105 log=${log} " [Thread $thread_id ] Failed to import : $PASTEC_OUTPUT \n"
108106 addQueryToSqlList ${thread_id} " $( getCoverLogInsertErrorQuery ${id} ${PASTEC_OUTPUT} ) "
109107 fi
110- rm -f ${output}
111108 echo -e ${log}
112109}
113110
You can’t perform that action at this time.
0 commit comments