fix: lower intervals in raw files 'already downloaded in the last X minutes'

This commit is contained in:
olli 2024-02-07 09:13:27 +01:00
parent f396df65fe
commit 58c1ed1bcf

View File

@ -3,7 +3,7 @@ function get_asset {
g_echo_note "RUNNING FUNCTION ${FUNCNAME} $@"
local f_ASSET="$1"
# write asset hist file with macd and rsi
# write asset hist file
local f_ASSET_HIST_FILE="asset-histories/${f_ASSET}.history-raw.csv"
if find "${f_ASSET_HIST_FILE}" -mmin -${INTERVAL_MIN} | grep -q "${f_ASSET_HIST_FILE}"
@ -43,14 +43,11 @@ function get_asset {
[ ${FULL_LOOP} == 0 ] && return 0
f_ASSET_HIST_FILE="asset-histories/${f_ASSET}.history.csv"
#if [ ${f_linecount} -lt 30 ] && [ ${f_lines} -ge 50 ] && [ ${INTERVAL} -lt 300 ]
#then
# g_echo_note "${f_ASSET_HIST_FILE}: set price to 5 minute period"
# if ! echo "${f_timestamp}" | egrep -q ":[0-5]0:|:[0-5]5:"
# then
# return 0
# fi
#fi
if find "${f_ASSET_HIST_FILE}" -mmin -${INTERVAL_MIN} | grep -q "${f_ASSET_HIST_FILE}"
then
g_echo_note "${f_ASSET_HIST_FILE} already downloaded in the last ${INTERVAL_MIN} minutes"
return 0
fi
# headline
#[ -s "${f_ASSET_HIST_FILE}" ] || echo "${csv_headline}" >"${f_ASSET_HIST_FILE}"