run the save all bpmn script on server boot w/ burnettk
This commit is contained in:
parent
3be2778649
commit
1cb779015f
|
@ -38,6 +38,8 @@ if [[ "${SPIFFWORKFLOW_BACKEND_LOAD_FIXTURE_DATA:-}" == "true" ]]; then
|
||||||
workers=1
|
workers=1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
SPIFFWORKFLOW_BACKEND_FAIL_ON_INVALID_PROCESS_MODELS=false poetry run python bin/save_all_bpmn.py
|
||||||
|
|
||||||
export IS_GUNICORN="true"
|
export IS_GUNICORN="true"
|
||||||
export PROCESS_WAITING_MESSAGES="true"
|
export PROCESS_WAITING_MESSAGES="true"
|
||||||
|
|
||||||
|
|
|
@ -32,5 +32,6 @@ else
|
||||||
export PROCESS_WAITING_MESSAGES="true"
|
export PROCESS_WAITING_MESSAGES="true"
|
||||||
fi
|
fi
|
||||||
export FLASK_DEBUG=1
|
export FLASK_DEBUG=1
|
||||||
|
SPIFFWORKFLOW_BACKEND_FAIL_ON_INVALID_PROCESS_MODELS=false poetry run python bin/save_all_bpmn.py
|
||||||
FLASK_APP=src/spiffworkflow_backend poetry run flask run -p 7000
|
FLASK_APP=src/spiffworkflow_backend poetry run flask run -p 7000
|
||||||
fi
|
fi
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
"""Grabs tickets from csv and makes process instances."""
|
"""Grabs tickets from csv and makes process instances."""
|
||||||
|
import os
|
||||||
from spiffworkflow_backend import get_hacked_up_app_for_script
|
from spiffworkflow_backend import get_hacked_up_app_for_script
|
||||||
from spiffworkflow_backend.services.data_setup_service import DataSetupService
|
from spiffworkflow_backend.services.data_setup_service import DataSetupService
|
||||||
|
|
||||||
|
@ -10,7 +11,7 @@ def main() -> None:
|
||||||
failing_process_models = DataSetupService.save_all()
|
failing_process_models = DataSetupService.save_all()
|
||||||
for bpmn_errors in failing_process_models:
|
for bpmn_errors in failing_process_models:
|
||||||
print(bpmn_errors)
|
print(bpmn_errors)
|
||||||
if len(failing_process_models) > 0:
|
if os.environ.get('SPIFFWORKFLOW_BACKEND_FAIL_ON_INVALID_PROCESS_MODELS') != "false" and len(failing_process_models) > 0:
|
||||||
exit(1)
|
exit(1)
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue