fix: first run

This commit is contained in:
olli 2024-02-07 12:18:53 +01:00
parent ad6f641c8c
commit 87dd453a1e
2 changed files with 2 additions and 1 deletions

View File

@ -1,6 +1,7 @@
function get_coingecko_data { function get_coingecko_data {
# get data from coingecko # get data from coingecko
local f_gecko_currencies="usd eur" local f_gecko_currencies="usd eur"
[ -f COINGECKO_GET_ASSETS_CMD_OUT ] || touch -t 197001010000 COINGECKO_GET_ASSETS_CMD_OUT
if find COINGECKO_GET_ASSETS_CMD_OUT -mmin +5 2>/dev/null | grep -q COINGECKO_GET_ASSETS_CMD_OUT if find COINGECKO_GET_ASSETS_CMD_OUT -mmin +5 2>/dev/null | grep -q COINGECKO_GET_ASSETS_CMD_OUT
then then
for f_gecko_currency in ${f_gecko_currencies} for f_gecko_currency in ${f_gecko_currencies}

View File

@ -1,7 +1,7 @@
function market_performance { function market_performance {
g_echo_note "RUNNING FUNCTION ${FUNCNAME} $@" g_echo_note "RUNNING FUNCTION ${FUNCNAME} $@"
if find MARKET_PERFORMANCE.csv -mmin -${INTERVAL_MIN} | grep -q "MARKET_PERFORMANCE.csv" if find MARKET_PERFORMANCE.csv -mmin -${INTERVAL_MIN} 2>/dev/null | grep -q "MARKET_PERFORMANCE.csv"
then then
g_echo_note "MARKET_PERFORMANCE.csv already downloaded in the last ${INTERVAL_MIN} minutes" g_echo_note "MARKET_PERFORMANCE.csv already downloaded in the last ${INTERVAL_MIN} minutes"
return 0 return 0