Compare commits

..

3 Commits

Author SHA1 Message Date
oleg fa6dd0fa95 fix 2024-07-25 10:22:51 -04:00
oleg ce68165eef fix 2024-07-24 19:57:30 -04:00
oleg 3932cbde37 fix 2024-07-24 13:53:26 -04:00
3 changed files with 15 additions and 5 deletions
+1 -1
View File
@@ -1 +1 @@
1.0.6
1.0.9
+13 -4
View File
@@ -19,8 +19,17 @@ is_container_running() {
if [ -z ${date_to_load} ] ; then
echo "Yesterday data has priority. Running historical container will be killed"
docker kill ${ContainerName}
echo "Yesterday data has priority. Running historical container will be stopped"
Cmd="docker stop ${ContainerName}"
echo ${Cmd} && eval ${Cmd}
Cmd="docker ps"
echo ${Cmd} && eval ${Cmd}
if is_container_running "$ContainerName"; then
echo "Container ${ContainerName} is still running."
exit 3
fi
else
echo "Historical run ${date_to_load}"
if is_container_running "$ContainerName"; then
@@ -59,7 +68,7 @@ else
fi
Cmd="docker run"
Cmd="${Cmd} --pull"
Cmd="${Cmd} --pull=always"
Cmd="${Cmd} --network=host"
Cmd="${Cmd} --name=${ContainerName}"
Cmd="${Cmd} --rm"
@@ -74,7 +83,7 @@ if [ "$?" != "0" ] ; then
fi
# truncate to avoid false positive
date_to_load=$(echo "${date_to_load} | xargs")
date_to_load=$(echo "${date_to_load}" | xargs)
if [ -n "${date_to_load}" ]; then
echo "Saving date_to_load to ${LastDayFile}"
echo ${date_to_load} > ${LastDayFile}
+1
View File
@@ -11,6 +11,7 @@ if [ -z ${date} ] ; then
fi
Cmd="docker run"
Cmd="${Cmd} --pull=always"
Cmd="${Cmd} --network=host"
Cmd="${Cmd} --name=crypto_md_day.${host}.${date}"
Cmd="${Cmd} --rm"