silo.low_code.framework.pipeline_processing module

exception silo.low_code.framework.pipeline_processing.RequestMoreData(*args, **kwargs)

Bases: Exception

Informs the framework to goto the previous requestor

Raising this exception within a step will rewind the device metric to the previous Requestor. This allows for additional data to be collected if required. The Requestor must know how to consume the data that is raised for the next collection to occur.

This step cannot be used within Syntax and Requestor steps. The Snippet Framework will consider this exception an unhandled exception and will stop the collection process for that device metric.

silo.low_code.framework.pipeline_processing.process_pipeline(device_metrics)

Execute all required device_metrics to get their result

Loops over the device_metrics and executes their plan. If a Requestor is found, stop executing the pipeline and queue it to execute later. This allows for the requestors to get all requests at once and enables batching, threading, and/or rate limiting.

The exception, RequestorFound, will be raised when a Requestor is the next step. That will move the device_metric into the batched jobs once all jobs are in a finished / pending state.

Parameters

device_metrics (list) – List of ResultContainers that need to be executed by the Snippet Framework.

Returns

All ResultContainers in a completed or error state

Return type

list

silo.low_code.framework.pipeline_processing.save_processed_results(device_metrics)

Save all collected Device Metrics into the Collection

Parameters

device_metrics (list) – List of ResultContainers that have successfully collected.