Getting ./bin/pyl to pass
This commit is contained in:
parent
879371255f
commit
ef7f78a366
|
@ -5,11 +5,12 @@ from spiffworkflow_backend.models.script_attributes_context import (
|
||||||
ScriptAttributesContext,
|
ScriptAttributesContext,
|
||||||
)
|
)
|
||||||
from spiffworkflow_backend.scripts.script import Script
|
from spiffworkflow_backend.scripts.script import Script
|
||||||
#from spiffworkflow_backend.servces.process_instance_processor import ProcessInstanceProcessor
|
|
||||||
from spiffworkflow_backend.services.process_instance_processor import (
|
from spiffworkflow_backend.services.process_instance_processor import (
|
||||||
ProcessInstanceProcessor,
|
ProcessInstanceProcessor,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
# from spiffworkflow_backend.servces.process_instance_processor import ProcessInstanceProcessor
|
||||||
|
|
||||||
|
|
||||||
class GetDataSizes(Script):
|
class GetDataSizes(Script):
|
||||||
"""GetDataSizes."""
|
"""GetDataSizes."""
|
||||||
|
@ -32,6 +33,10 @@ class GetDataSizes(Script):
|
||||||
"""Run."""
|
"""Run."""
|
||||||
task = script_attributes_context.task
|
task = script_attributes_context.task
|
||||||
return {
|
return {
|
||||||
"cumulative_task_data_size": ProcessInstanceProcessor.get_task_data_size(task.workflow),
|
"cumulative_task_data_size": ProcessInstanceProcessor.get_task_data_size(
|
||||||
"python_env_size": ProcessInstanceProcessor.get_python_env_size(task.workflow),
|
task.workflow
|
||||||
|
),
|
||||||
|
"python_env_size": ProcessInstanceProcessor.get_python_env_size(
|
||||||
|
task.workflow
|
||||||
|
),
|
||||||
}
|
}
|
||||||
|
|
|
@ -1624,7 +1624,9 @@ class ProcessInstanceProcessor:
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def get_python_env_size(cls, bpmn_process_instance: BpmnWorkflow) -> int:
|
def get_python_env_size(cls, bpmn_process_instance: BpmnWorkflow) -> int:
|
||||||
user_defined_state = bpmn_process_instance.script_engine.environment.user_defined_state()
|
user_defined_state = (
|
||||||
|
bpmn_process_instance.script_engine.environment.user_defined_state()
|
||||||
|
)
|
||||||
return cls._get_data_size(user_defined_state)
|
return cls._get_data_size(user_defined_state)
|
||||||
|
|
||||||
def check_task_data_size(self) -> None:
|
def check_task_data_size(self) -> None:
|
||||||
|
|
Loading…
Reference in New Issue