fix
This commit is contained in:
parent
173f7c1b97
commit
b0dfda6c9b
@ -41,7 +41,12 @@ function get_levels_all {
|
||||
printf '%(%Y-%m-%d %H:%M:%S)T' >"${f_levelsfile}.levels-calculating"
|
||||
g_echo_note "Estimating relevant levels of $f_levelsfile"
|
||||
|
||||
get_levels "$f_levelsfile" && printf '%(%Y-%m-%d %H:%M:%S)T' >"${f_levelsfile}.levels-calculated"
|
||||
if get_levels "$f_levelsfile"
|
||||
then
|
||||
printf '%(%Y-%m-%d %H:%M:%S)T' >"${f_levelsfile}.levels-calculated"
|
||||
else
|
||||
continue
|
||||
fi
|
||||
|
||||
echo "${f_levels[@]}" >"${f_levelsfile}.levels.new"
|
||||
mv "${f_levelsfile}.levels.new" "${f_levelsfile}.levels"
|
||||
@ -63,6 +68,9 @@ function get_levels {
|
||||
|
||||
g_echo_note "RUNNING FUNCTION ${FUNCNAME} $@"
|
||||
|
||||
# reset old levels var
|
||||
unset f_levels
|
||||
|
||||
local f_levelsfile=$1
|
||||
if ! [ -s "$f_levelsfile" ]
|
||||
then
|
||||
@ -85,9 +93,6 @@ function get_levels {
|
||||
return 1
|
||||
fi
|
||||
|
||||
# reset old levels var
|
||||
unset f_levels
|
||||
|
||||
local f_min_occurrences i j f_level f_level_count f_level_prices f_level_first_price f_baseprice f_threshold_test
|
||||
|
||||
# # some key points
|
||||
|
Loading…
Reference in New Issue
Block a user