Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
H
hivemind
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
hive
hivemind
Commits
984888bb
Commit
984888bb
authored
2 years ago
by
Bartek Wrona
Browse files
Options
Downloads
Patches
Plain Diff
wait-for-postgres.sh uses dedicated SQL function exposed by HAF, to verify instance ready state.
parent
241e654f
No related branches found
No related tags found
2 merge requests
!584
Changes to be delivered to master as 1.27 release
,
!558
Merge develop-haf with current develop
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
scripts/ci/wait-for-postgres.sh
+2
-2
2 additions, 2 deletions
scripts/ci/wait-for-postgres.sh
with
2 additions
and
2 deletions
scripts/ci/wait-for-postgres.sh
+
2
−
2
View file @
984888bb
...
...
@@ -9,8 +9,8 @@ DATABASE_URL=$1
wait_for_postgres
()
{
echo
"Waiting for postgres hosted by container at the URL:
${
DATABASE_URL
}
."
timeout
$LIMIT
bash
-c
"until psql "
${
DATABASE_URL
}
" -c
'
SELECT
* FROM hive.contexts;'
; do sleep 3 ; done"
timeout
$LIMIT
bash
-c
"until psql "
${
DATABASE_URL
}
" -c 'SELECT NOT EXISTS(SELECT 1 FROM hive.indexes_constraints);'; do sleep 3 ; done"
timeout
$LIMIT
bash
-c
"until psql
\
"
${
DATABASE_URL
}
\
"
-c
\"
SELECT
hive.wait_for_ready_instance('4 MIN'::interval);
\"
; do sleep 3 ; done"
}
wait_for_postgres
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment