diff --git a/bin/recreate_db b/bin/recreate_db index 48333041..aecee6d3 100755 --- a/bin/recreate_db +++ b/bin/recreate_db @@ -16,7 +16,7 @@ if [[ "${1:-}" == "clean" ]]; then rm -rf migrations/ fi - rm -f ./src/spiffworkflow_backend/db*.sqlite3 + rm -f ./src/instance/*.sqlite3 mysql -uroot -e "DROP DATABASE IF EXISTS spiffworkflow_backend_development" mysql -uroot -e "DROP DATABASE IF EXISTS spiffworkflow_backend_testing" fi diff --git a/src/spiffworkflow_backend/services/process_instance_processor.py b/src/spiffworkflow_backend/services/process_instance_processor.py index 0f46c16b..20b589cf 100644 --- a/src/spiffworkflow_backend/services/process_instance_processor.py +++ b/src/spiffworkflow_backend/services/process_instance_processor.py @@ -341,11 +341,11 @@ class ProcessInstanceProcessor: self.process_instance_model.last_updated = datetime.utcnow() if self.process_instance_model.start_in_seconds is None: - self.process_instance_model.start_in_seconds = time.time() + self.process_instance_model.start_in_seconds = round(time.time()) if self.process_instance_model.end_in_seconds is None: if self.bpmn_process_instance.is_completed(): - self.process_instance_model.end_in_seconds = time.time() + self.process_instance_model.end_in_seconds = round(time.time()) db.session.add(self.process_instance_model) db.session.commit() diff --git a/src/spiffworkflow_backend/services/process_instance_service.py b/src/spiffworkflow_backend/services/process_instance_service.py index 146e02bc..88131236 100644 --- a/src/spiffworkflow_backend/services/process_instance_service.py +++ b/src/spiffworkflow_backend/services/process_instance_service.py @@ -38,7 +38,7 @@ class ProcessInstanceService: process_model_identifier=process_model_identifier, process_group_identifier=process_group_identifier, last_updated=datetime.now(), - start_in_seconds=time.time(), + start_in_seconds=round(time.time()), ) db.session.add(process_instance_model) db.session.commit()