add timeout to prevent script from blocking
This commit is contained in:
parent
1f16f36483
commit
0850627dab
1 changed files with 1 additions and 1 deletions
|
|
@ -87,7 +87,7 @@ case $STATUS in
|
|||
;;
|
||||
esac
|
||||
|
||||
BEVERAGE_SUPPLY="$(wget -O- "$YAMMAT_JSON_URL" 2>/dev/null | jq -rc "[ .[] | select( . | .amount > 0 ) | { value: .amount, unit: \"btl\", name: .name, description: ([(.price/100), \"€\"]|join(\" \")) } ]")"
|
||||
BEVERAGE_SUPPLY="$(wget --timeout 50 --tries 1 -O- "$YAMMAT_JSON_URL" 2>/dev/null | jq -rc "[ .[] | select( . | .amount > 0 ) | { value: .amount, unit: \"btl\", name: .name, description: ([(.price/100), \"€\"]|join(\" \")) } ]")"
|
||||
if [ -z "$BEVERAGE_SUPPLY" ]; then
|
||||
BEVERAGE_SUPPLY="$(cat $BEVERAGE_SUPPLY_TMP)"
|
||||
else
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue