diff options
author | Lin Jen-Shin <godfat@godfat.org> | 2017-03-22 22:31:07 +0800 |
---|---|---|
committer | Lin Jen-Shin <godfat@godfat.org> | 2017-03-24 04:47:00 +0800 |
commit | 3e1bd5570f0ca277fb82a45d83f5bf44f3663a0d (patch) | |
tree | 50c19275e482f22cd8b6fdcbe904c8c74e5e5e8f /scripts/utils.sh | |
parent | 435468af380d0200c5b133f1c0263daf2c8a7783 (diff) | |
download | gitlab-ce-3e1bd5570f0ca277fb82a45d83f5bf44f3663a0d.tar.gz |
Test both PostgreSQL and MySQL for the win.
Diffstat (limited to 'scripts/utils.sh')
-rw-r--r-- | scripts/utils.sh | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/scripts/utils.sh b/scripts/utils.sh new file mode 100644 index 00000000000..6faa701f0ce --- /dev/null +++ b/scripts/utils.sh @@ -0,0 +1,14 @@ +retry() { + if eval "$@"; then + return 0 + fi + + for i in 2 1; do + sleep 3s + echo "Retrying $i..." + if eval "$@"; then + return 0 + fi + done + return 1 +} |