some updates to test w/ burnettk
This commit is contained in:
parent
2ebb3a14ce
commit
94c6f4ccda
|
@ -7,10 +7,8 @@ function error_handler() {
|
||||||
trap 'error_handler ${LINENO} $?' ERR
|
trap 'error_handler ${LINENO} $?' ERR
|
||||||
set -o errtrace -o errexit -o nounset -o pipefail
|
set -o errtrace -o errexit -o nounset -o pipefail
|
||||||
|
|
||||||
if [[ -z "${BPMN_SPEC_ABSOLUTE_DIR:-}" ]]; then
|
BPMN_SPEC_ABSOLUTE_DIR=$(./bin/find_sample_process_models)
|
||||||
script_dir="$( cd -- "$(dirname "$0")" >/dev/null 2>&1 ; pwd -P )"
|
export BPMN_SPEC_ABSOLUTE_DIR
|
||||||
export BPMN_SPEC_ABSOLUTE_DIR="$script_dir/../../../sample-process-models"
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [[ -z "${SPIFFWORKFLOW_BACKEND_DOCKER_COMPOSE_PROFILE:-}" ]]; then
|
if [[ -z "${SPIFFWORKFLOW_BACKEND_DOCKER_COMPOSE_PROFILE:-}" ]]; then
|
||||||
export SPIFFWORKFLOW_BACKEND_DOCKER_COMPOSE_PROFILE=run
|
export SPIFFWORKFLOW_BACKEND_DOCKER_COMPOSE_PROFILE=run
|
||||||
|
|
|
@ -0,0 +1,30 @@
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
function error_handler() {
|
||||||
|
>&2 echo "Exited with BAD EXIT CODE '${2}' in ${0} script at line: ${1}."
|
||||||
|
exit "$2"
|
||||||
|
}
|
||||||
|
trap 'error_handler ${LINENO} $?' ERR
|
||||||
|
set -o errtrace -o errexit -o nounset -o pipefail
|
||||||
|
|
||||||
|
if [[ -z "${BPMN_SPEC_ABSOLUTE_DIR:-}" ]]; then
|
||||||
|
script_dir="$( cd -- "$(dirname "$0")" >/dev/null 2>&1 ; pwd -P )"
|
||||||
|
|
||||||
|
BPMN_SPEC_ABSOLUTE_DIR="${script_dir}/../../../sample-process-models"
|
||||||
|
if [[ ! -d "$BPMN_SPEC_ABSOLUTE_DIR" ]]; then
|
||||||
|
BPMN_SPEC_ABSOLUTE_DIR="${script_dir}/../../sample-process-models"
|
||||||
|
if [[ ! -d "$BPMN_SPEC_ABSOLUTE_DIR" ]]; then
|
||||||
|
>&2 echo "ERROR: Could not find a location for the sample processes. Last tried: $BPMN_SPEC_ABSOLUTE_DIR"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
export BPMN_SPEC_ABSOLUTE_DIR
|
||||||
|
pushd "$BPMN_SPEC_ABSOLUTE_DIR"
|
||||||
|
if [[ "$(git rev-parse --abbrev-ref HEAD)" == "main" ]]; then
|
||||||
|
>&2 echo "ERROR: please do not use the main branch of sample-process-models. use dev"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
popd
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "$BPMN_SPEC_ABSOLUTE_DIR"
|
|
@ -17,25 +17,9 @@ if [[ -z "${SPIFFWORKFLOW_BACKEND_ENV:-}" ]]; then
|
||||||
export SPIFFWORKFLOW_BACKEND_ENV=development
|
export SPIFFWORKFLOW_BACKEND_ENV=development
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ -z "${BPMN_SPEC_ABSOLUTE_DIR:-}" ]]; then
|
BPMN_SPEC_ABSOLUTE_DIR=$(./bin/find_sample_process_models)
|
||||||
script_dir="$( cd -- "$(dirname "$0")" >/dev/null 2>&1 ; pwd -P )"
|
export BPMN_SPEC_ABSOLUTE_DIR
|
||||||
|
echo "$BPMN_SPEC_ABSOLUTE_DIR"
|
||||||
BPMN_SPEC_ABSOLUTE_DIR="${script_dir}/../../../sample-process-models"
|
|
||||||
if [[ ! -d "$BPMN_SPEC_ABSOLUTE_DIR" ]]; then
|
|
||||||
BPMN_SPEC_ABSOLUTE_DIR="${script_dir}/../../sample-process-models"
|
|
||||||
if [[ ! -d "$BPMN_SPEC_ABSOLUTE_DIR" ]]; then
|
|
||||||
>&2 echo "ERROR: Could not find a location for the sample processes. Last tried: $BPMN_SPEC_ABSOLUTE_DIR"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
export BPMN_SPEC_ABSOLUTE_DIR
|
|
||||||
pushd "$BPMN_SPEC_ABSOLUTE_DIR"
|
|
||||||
if [[ "$(git rev-parse --abbrev-ref HEAD)" == "main" ]]; then
|
|
||||||
>&2 echo "ERROR: please do not use the main branch of sample-process-models. use dev"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
popd
|
|
||||||
fi
|
|
||||||
|
|
||||||
export FLASK_SESSION_SECRET_KEY=super_secret_key
|
export FLASK_SESSION_SECRET_KEY=super_secret_key
|
||||||
export APPLICATION_ROOT="/"
|
export APPLICATION_ROOT="/"
|
||||||
|
@ -46,6 +30,7 @@ else
|
||||||
export FLASK_DEBUG=1
|
export FLASK_DEBUG=1
|
||||||
|
|
||||||
if [[ "${SPIFFWORKFLOW_BACKEND_RUN_DATA_SETUP:-}" != "false" ]]; then
|
if [[ "${SPIFFWORKFLOW_BACKEND_RUN_DATA_SETUP:-}" != "false" ]]; then
|
||||||
|
echo "RUNING STUFF"
|
||||||
SPIFFWORKFLOW_BACKEND_FAIL_ON_INVALID_PROCESS_MODELS=false poetry run python bin/save_all_bpmn.py
|
SPIFFWORKFLOW_BACKEND_FAIL_ON_INVALID_PROCESS_MODELS=false poetry run python bin/save_all_bpmn.py
|
||||||
fi
|
fi
|
||||||
FLASK_APP=src/spiffworkflow_backend poetry run flask run -p 7000
|
FLASK_APP=src/spiffworkflow_backend poetry run flask run -p 7000
|
||||||
|
|
|
@ -9,6 +9,7 @@ def main() -> None:
|
||||||
"""Main."""
|
"""Main."""
|
||||||
app = create_app()
|
app = create_app()
|
||||||
with app.app_context():
|
with app.app_context():
|
||||||
|
print("HEY")
|
||||||
failing_process_models = DataSetupService.save_all_process_models()
|
failing_process_models = DataSetupService.save_all_process_models()
|
||||||
for bpmn_errors in failing_process_models:
|
for bpmn_errors in failing_process_models:
|
||||||
print(bpmn_errors)
|
print(bpmn_errors)
|
||||||
|
|
|
@ -50,8 +50,8 @@ class DataSetupService:
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
current_app.logger.debug(
|
current_app.logger.debug(
|
||||||
"DataSetupService.save_all_process_models() end"
|
"DataSetupService.save_all_process_models() end"
|
||||||
)
|
)
|
||||||
db.session.commit()
|
db.session.commit()
|
||||||
return failing_process_models
|
return failing_process_models
|
||||||
|
|
Loading…
Reference in New Issue