Configuration¶
The config
method can be used to set some configuration options. It should be called before calling init
which starts a run. All arguments must be stated explicitly as keyword arguments.
suppress_errors
: if set toFalse
problems with the Simvue client will trigger exceptions. By default this isTrue
, ensuring that the main application can run successfully even in the event of misconfiguration or problems with the monitoring.queue_blocking
: when set toTrue
the metrics and events queues will block if they become full. By default this isFalse
, meaning that metrics and/or events will be silently dropped if either of the queues fills.storage_id
: specify, by identifier, the storage instance to usedisable_resources_metrics
: when set toTrue
resource usage metrics are not collected.resources_metrics_interval
: resource usage metrics are collected at this interval, in seconds. The default is 60 secs.enable_emission_metrics
: when set toTrue
, metrics about the energy used and emissions generated by your run will be collected. Warning - this is an experimental feature.emission_metrics_interval
: emissions metrics are collected at this interval, in seconds. The default is 60 secs.abort_on_alert
: whether this run can be terminated by alerts which are configured to abort. Choose from:'run'
: the current run is aborted'terminate'
: the script itself is terminated'ignore'
: alerts will not affect this run
Example:
from simvue import Run
with Run() as run:
run.config(
queue_blocking=True,
resources_metrics_interval=5
)
run.init()