Skip to content

neops.core.provider.base.base_result_writer

BaseResultWriter

Writes/updates the result object


Methods

write_results(self,results: neops.core.provider.base.result.provider_result_composite.ProviderResultsComposite,execution_id: int,run_on_result: neops.core.provider.base.enum.RunOnEnum,success_message: str = '',subtask_finish: bool = False,task_finish: bool = False,neops_task_id: Union[int, NoneType] = None,granularity: int = 5) -> NoneType
This method is called on the beginning and the end of a task or a subtask (pre- and post run tasks).

It updates the result set in the databae for the relevant entities on which the task is executed and informs the user over the progress.

\ param results (ProviderResultsComposite): All results of the run cycle methods \ param execution_id (int): id of the current execution \ param run_on_result (RunOnEnum): for which entity the results should be stored \ param success_message (str, optional): message to be set for a successfully processed element \ param subtask_finish (bool, optional): identifies if a subtask (pre- or post run task is finished) \ param task_finish (bool, optional): identifies if the main task is finished \ param neops_task_id (Optional[int], optional): the id of the task whichone ran \ param granularity (int, optional): describes the importance of a task result (values from 1-10, higher values are more important results, default is 5)