From c939a79df3d7fe79ded3a9e30474cc8a2868e91a Mon Sep 17 00:00:00 2001 From: jasquat Date: Thu, 26 Jan 2023 15:38:14 -0500 Subject: [PATCH] updated prefix for background instances w/ burnettk --- .../services/process_instance_service.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/spiffworkflow-backend/src/spiffworkflow_backend/services/process_instance_service.py b/spiffworkflow-backend/src/spiffworkflow_backend/services/process_instance_service.py index d3cb30a9..9b07ce1f 100644 --- a/spiffworkflow-backend/src/spiffworkflow_backend/services/process_instance_service.py +++ b/spiffworkflow-backend/src/spiffworkflow_backend/services/process_instance_service.py @@ -76,6 +76,7 @@ class ProcessInstanceService: .filter(ProcessInstanceModel.status == ProcessInstanceStatus.waiting.value) .all() ) + process_instance_lock_prefix = "Background" for process_instance in records: locked = False processor = None @@ -84,7 +85,7 @@ class ProcessInstanceService: f"Processing process_instance {process_instance.id}" ) processor = ProcessInstanceProcessor(process_instance) - processor.lock_process_instance("Web") + processor.lock_process_instance(process_instance_lock_prefix) locked = True processor.do_engine_steps(save=True) except ProcessInstanceIsAlreadyLockedError: @@ -102,7 +103,7 @@ class ProcessInstanceService: current_app.logger.error(error_message) finally: if locked and processor: - processor.unlock_process_instance("Web") + processor.unlock_process_instance(process_instance_lock_prefix) @staticmethod def processor_to_process_instance_api(