Platform Unstable #97

Merged
max merged 34 commits from platform-unstable into master 2024-06-07 00:17:36 +03:00
Showing only changes of commit 2b7c629304 - Show all commits

View file

@ -30,11 +30,11 @@ in
currentTime=$(date +%s)
lastScheduledTime=$(consul kv get system/coordinated-reboot/last)
if [[ $? -ne 0 ]]; then
lastScheduledTime=$((currentTime - 300))
lastScheduledTime=$((currentTime - 900))
fi
nextScheduledTime=$((lastScheduledTime + 3600))
if [[ $nextScheduledTime -lt $((currentTime + 300)) ]]; then
nextScheduledTime=$((currentTime + 300))
if [[ $nextScheduledTime -lt $((currentTime + 900)) ]]; then
nextScheduledTime=$((currentTime + 900))
fi
consul kv put system/coordinated-reboot/last $nextScheduledTime
echo "Scheduling reboot for $nextScheduledTime"