put back spiff step details for today
This commit is contained in:
parent
40b23c31c7
commit
a38aa139a6
|
@ -102,6 +102,9 @@ from spiffworkflow_backend.services.user_service import UserService
|
|||
from spiffworkflow_backend.services.workflow_execution_service import (
|
||||
execution_strategy_named,
|
||||
)
|
||||
from spiffworkflow_backend.services.workflow_execution_service import (
|
||||
StepDetailLoggingDelegate,
|
||||
)
|
||||
from spiffworkflow_backend.services.workflow_execution_service import (
|
||||
TaskModelSavingDelegate,
|
||||
)
|
||||
|
@ -1613,20 +1616,19 @@ class ProcessInstanceProcessor:
|
|||
save: bool = False,
|
||||
execution_strategy_name: Optional[str] = None,
|
||||
) -> None:
|
||||
"""Do_engine_steps."""
|
||||
# NOTE: Commenting out to test how this changes performance:
|
||||
# def spiff_step_details_mapping_builder(
|
||||
# task: SpiffTask, start: float, end: float
|
||||
# ) -> dict:
|
||||
# self._script_engine.environment.revise_state_with_task_data(task)
|
||||
# return self.spiff_step_details_mapping(task, start, end)
|
||||
#
|
||||
# step_delegate = StepDetailLoggingDelegate(
|
||||
# self.increment_spiff_step, spiff_step_details_mapping_builder
|
||||
# )
|
||||
# NOTE: To avoid saving spiff step details, just comment out this function and the step_delegate and
|
||||
# set the TaskModelSavingDelegate's secondary_engine_step_delegate to None.
|
||||
def spiff_step_details_mapping_builder(
|
||||
task: SpiffTask, start: float, end: float
|
||||
) -> dict:
|
||||
self._script_engine.environment.revise_state_with_task_data(task)
|
||||
return self.spiff_step_details_mapping(task, start, end)
|
||||
|
||||
step_delegate = StepDetailLoggingDelegate(
|
||||
self.increment_spiff_step, spiff_step_details_mapping_builder
|
||||
)
|
||||
task_model_delegate = TaskModelSavingDelegate(
|
||||
# secondary_engine_step_delegate=step_delegate,
|
||||
secondary_engine_step_delegate=None,
|
||||
secondary_engine_step_delegate=step_delegate,
|
||||
serializer=self._serializer,
|
||||
process_instance=self.process_instance_model,
|
||||
)
|
||||
|
|
Loading…
Reference in New Issue