Compare commits

..

2 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
2 changed files with 13 additions and 4 deletions
+1 -1
View File
@@ -1 +1 @@
1.0.7 1.0.9
+12 -3
View File
@@ -19,8 +19,17 @@ is_container_running() {
if [ -z ${date_to_load} ] ; then if [ -z ${date_to_load} ] ; then
echo "Yesterday data has priority. Running historical container will be killed" echo "Yesterday data has priority. Running historical container will be stopped"
docker kill ${ContainerName} 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 else
echo "Historical run ${date_to_load}" echo "Historical run ${date_to_load}"
if is_container_running "$ContainerName"; then if is_container_running "$ContainerName"; then
@@ -74,7 +83,7 @@ if [ "$?" != "0" ] ; then
fi fi
# truncate to avoid false positive # 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 if [ -n "${date_to_load}" ]; then
echo "Saving date_to_load to ${LastDayFile}" echo "Saving date_to_load to ${LastDayFile}"
echo ${date_to_load} > ${LastDayFile} echo ${date_to_load} > ${LastDayFile}