Fixing formatting?

This commit is contained in:
Dan 2023-04-20 17:05:05 -04:00
parent 259290846d
commit 3d235e0c8e
1 changed files with 5 additions and 7 deletions

View File

@ -115,14 +115,13 @@ class ProcessInstanceService:
.filter(ProcessInstanceModel.id.in_(process_instance_ids_to_check)) # type: ignore .filter(ProcessInstanceModel.id.in_(process_instance_ids_to_check)) # type: ignore
.all() .all()
) )
execution_strategy_name = current_app.config[ execution_strategy_name = current_app.config["SPIFFWORKFLOW_BACKEND_ENGINE_STEP_DEFAULT_STRATEGY_BACKGROUND"]
"SPIFFWORKFLOW_BACKEND_ENGINE_STEP_DEFAULT_STRATEGY_BACKGROUND"
]
for process_instance in records: for process_instance in records:
current_app.logger.info(f"Processing process_instance {process_instance.id}") current_app.logger.info(f"Processing process_instance {process_instance.id}")
try: try:
cls.run_process_instance_with_processor(process_instance, status_value=status_value, cls.run_process_instance_with_processor(
execution_strategy_name=execution_strategy_name) process_instance, status_value=status_value, execution_strategy_name=execution_strategy_name
)
except ProcessInstanceIsAlreadyLockedError: except ProcessInstanceIsAlreadyLockedError:
continue continue
except Exception as e: except Exception as e:
@ -135,8 +134,7 @@ class ProcessInstanceService:
@classmethod @classmethod
def run_process_instance_with_processor( def run_process_instance_with_processor(
cls, process_instance: ProcessInstanceModel, status_value: Optional[str] = None, cls, process_instance: ProcessInstanceModel, status_value: Optional[str] = None, execution_strategy_name=None
execution_strategy_name = None
) -> Optional[ProcessInstanceProcessor]: ) -> Optional[ProcessInstanceProcessor]:
processor = None processor = None
with ProcessInstanceQueueService.dequeued(process_instance): with ProcessInstanceQueueService.dequeued(process_instance):