From 4f3f7fdbec0567d10aa535dc284976a7b8abeee4 Mon Sep 17 00:00:00 2001 From: olli Date: Tue, 5 Nov 2024 12:37:29 +0100 Subject: [PATCH] error reporting and added get_marketdata_all --- dabo/fetch-ohlcv-candles-indicators.sh | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/dabo/fetch-ohlcv-candles-indicators.sh b/dabo/fetch-ohlcv-candles-indicators.sh index e65eb02..79cf7f4 100755 --- a/dabo/fetch-ohlcv-candles-indicators.sh +++ b/dabo/fetch-ohlcv-candles-indicators.sh @@ -32,16 +32,21 @@ do . ../../dabo-bot.conf . ../../dabo-bot.override.conf # notify failed downloads - [ "$interval" = "1d" ] && cat FAILED_*/* 2>/dev/null | notify.sh -s "Failed downloads" + if [ "$interval" = "1h" ] + then + cat FAILED_*/* 2>/dev/null | notify.sh -s "Failed downloads" + mkdir -p REPORTED_FAILED + mv FAILED_*/* REPORTED_FAILED/ 2>/dev/null + fi # Timestamp export f_timestamp=$(g_date_print) # get candles and indicators get_ohlcv-candles $interval + [[ $interval != 1w ]] && get_marketdata_all $interval [ -n "$seconds" ] && sleeptime=$(( ( ($seconds - $(TZ=UTC printf "%(%s)T") % $seconds) % $seconds + 2 ))) #[[ $interval = 4h ]] && sleeptime=?? if [ "$interval" = "1d" ] then - get_marketdata_fear_and_greed_alternativeme sleeptime=$(($(TZ=UTC date +%s -d "tomorrow 0:01") - $(date +%s) +2 )) fi [ "$interval" = "1w" ] && sleeptime=$(($(TZ=UTC date +%s -d "next monday 0:01") - $(date +%s) +2 ))