-
Notifications
You must be signed in to change notification settings - Fork 3
Task/plat 12806 add flock to entrypoints #75
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
Open
awiegers
wants to merge
7
commits into
dev
Choose a base branch
from
task/PLAT-12806-add-flock-to-entrypoints
base: dev
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+41
−2
Open
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
3361a50
Release v0.8.0 – Merge from dev (#62)
mstrong98 cacba25
Release v0.8.1 – Merge from dev (#66)
mstrong98 6e3600e
Release v0.8.2 – Merge from dev
mstrong98 b8e6a44
PLAT-12806: bash: updating 600 and 610 entry point scripts to lock if…
47886b9
PLAT-12806: bash: improving log comments.
26a6c8f
Update deployment/entrypoint.d/600_init_db.sh
awiegers ff5102b
Update deployment/entrypoint.d/610_upgrade_db.sh
awiegers File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,7 +1,25 @@ | ||
| #!/bin/bash | ||
|
|
||
| upgrade_database() { | ||
| if [ "${MYW_DB_UPGRADE}" == "YES" ]; then | ||
| # START SECTION db upgrade - if you edit these lines manually note that your change will get lost if you run the IQGeo Project Update tool | ||
| if myw_db $MYW_DB_NAME list versions --layout keys | grep myw_comms_schema | grep version=; then myw_db $MYW_DB_NAME upgrade comms; fi | ||
| # END SECTION | ||
| fi | ||
| fi | ||
| } | ||
|
|
||
| if [ -n "${SHARED_DIRECTORY}" ]; then | ||
| log "Found shared-directory, attempting to lock 610_upgrade_db..." | ||
| LOCKFILE="${SHARED_DIRECTORY}/610_upgrade_db.lock" | ||
| ( | ||
awiegers marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| if ! flock -n 200; then | ||
| flock 200 | ||
| fi | ||
|
|
||
| upgrade_database | ||
|
|
||
| ) 200>"${LOCKFILE}" | ||
| else | ||
| log "shared-directory not found, upgrading database." | ||
| upgrade_database | ||
| fi | ||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.