-
Notifications
You must be signed in to change notification settings - Fork 882
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Issue 1698: Use safe_sleep executable in bash scripts #1707
Issue 1698: Use safe_sleep executable in bash scripts #1707
Conversation
@@ -44,17 +28,17 @@ elif [[ $returnCode == 1 ]]; then | |||
exit 0 | |||
elif [[ $returnCode == 2 ]]; then | |||
echo "Runner listener exit with retryable error, re-launch runner in 5 seconds." | |||
safe_sleep | |||
./bin/safe_sleep.sh 5 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm always a bit iffy on relative paths, does is work fine if I start run.sh with an absolute path from a different directory?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I changed to absolute paths and changed the location of the safe_sleep
script, so it is not in bin folder.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
Problems were:
sleep
in the case when both ping and sleep are missing insafe_sleep
functionsleep
function instead ofsafe_sleep
in bash scriptRelated issue: #1698
After this change,
safe_sleep
is implemented as separate executable bash script, and scriptsrun-helper.sh
andupdate.sh
are using that function instead of standardsleep
function.