Merge commit '71e189afbc127b574cca8d02fc31b2e65aff0d52'
This commit is contained in:
commit
bc7db19a90
|
@ -10,6 +10,11 @@ set -o errtrace -o errexit -o nounset -o pipefail
|
|||
# run migrations
|
||||
export FLASK_APP=/app/src/spiffworkflow_backend
|
||||
|
||||
if [[ "${WAIT_FOR_DB_TO_BE_READY:-}" == "true" ]]; then
|
||||
echo 'Waiting for db to be ready...'
|
||||
poetry run python ./bin/wait_for_db_to_be_ready.py
|
||||
fi
|
||||
|
||||
if [[ "${DOWNGRADE_DB:-}" == "true" ]]; then
|
||||
echo 'Downgrading database...'
|
||||
poetry run flask db downgrade
|
||||
|
|
|
@ -26,7 +26,7 @@
|
|||
"oauth2DeviceCodeLifespan": 600,
|
||||
"oauth2DevicePollingInterval": 5,
|
||||
"enabled": true,
|
||||
"sslRequired": "external",
|
||||
"sslRequired": "NONE",
|
||||
"registrationAllowed": false,
|
||||
"registrationEmailAsUsername": false,
|
||||
"rememberMe": false,
|
||||
|
@ -1254,6 +1254,7 @@
|
|||
"secret": "JXeQExm0JhQPLumgHtIIqf52bDalHz0q",
|
||||
"redirectUris": [
|
||||
"http://localhost:7000/*",
|
||||
"http://67.205.133.116:7000/*",
|
||||
"http://167.172.242.138:7000/*"
|
||||
],
|
||||
"webOrigins": [],
|
||||
|
@ -1523,6 +1524,7 @@
|
|||
"clientAuthenticatorType": "client-secret",
|
||||
"redirectUris": [
|
||||
"http://localhost:7001/*",
|
||||
"http://67.205.133.116:7000/*",
|
||||
"http://167.172.242.138:7001/*"
|
||||
],
|
||||
"webOrigins": ["*"],
|
||||
|
@ -1591,6 +1593,7 @@
|
|||
"secret": "6o8kIKQznQtejHOdRhWeKorBJclMGcgA",
|
||||
"redirectUris": [
|
||||
"http://localhost:7001/*",
|
||||
"http://67.205.133.116:7000/*",
|
||||
"http://167.172.242.138:7001/*"
|
||||
],
|
||||
"webOrigins": [],
|
||||
|
|
|
@ -0,0 +1,28 @@
|
|||
"""Grabs tickets from csv and makes process instances."""
|
||||
|
||||
from spiffworkflow_backend import get_hacked_up_app_for_script
|
||||
from flask_bpmn.models.db import db
|
||||
import sqlalchemy
|
||||
import time
|
||||
|
||||
|
||||
def try_to_connect(start_time: float) -> None:
|
||||
try:
|
||||
db.first_or_404('select 1')
|
||||
except sqlalchemy.exc.DatabaseError as exception:
|
||||
if time.time() - start_time > 15:
|
||||
raise exception
|
||||
else:
|
||||
time.sleep(1)
|
||||
try_to_connect(start_time)
|
||||
|
||||
def main() -> None:
|
||||
"""Main."""
|
||||
app = get_hacked_up_app_for_script()
|
||||
start_time = time.time()
|
||||
with app.app_context():
|
||||
try_to_connect(start_time)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
Loading…
Reference in New Issue