forked from Telodendria/Telodendria
Make Telodendria Bot retry fetching if it failed.
This commit is contained in:
parent
90a74c3b0a
commit
cdb26b5223
1 changed files with 6 additions and 1 deletions
|
@ -51,7 +51,12 @@ case "$1" in
|
|||
continue
|
||||
fi
|
||||
|
||||
$CURL -o "$TP_DIR/ingress/$id.patch" "$HOMESERVER/media/v3/download/$server/$id"
|
||||
if ! $CURL -o "$TP_DIR/ingress/$id.patch" "$HOMESERVER/media/v3/download/$server/$id"; then
|
||||
rm "$TP_DIR"/ingress/$id.patch"
|
||||
echo "Failed to fetch mxc://$server/$id."
|
||||
echo "Will try again next time."
|
||||
continue
|
||||
fi
|
||||
|
||||
count=$(cat "$TP_DIR/count.txt")
|
||||
count=$((count + 1))
|
||||
|
|
Loading…
Reference in a new issue