Created
June 7, 2019 09:15
-
-
Save srfrnk/7229c9038d5d59eaca97340408ec42b5 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
echo "Checking health:" | |
if [[ -f /app/jobId ]] | |
then | |
jobId=$(cat /app/jobId) | |
echo "Checking job ${jobId}..." | |
count=$(flink list -m ${jobManagerUrl} -r | grep -e ": ${jobId} :" | wc -l) | |
if [[ ${count} -gt 0 ]] | |
then echo "Job running.";exit 0 | |
else echo "Job missing.";exit 1 | |
fi | |
else | |
echo "Job not yet started!" | |
exit 0 # Job has not yet started - report as healthy (Issue #1) | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment