gemseo / core

monitoring module

Monitoring mechanism to track GEMSEO execution (update events)

class gemseo.core.monitoring.Monitoring(*args, **kwargs)[source]

Bases: object

This class implements the observer pattern. It is a singleton, it is called by GEMSEO core classes like MDODicipline whenever an event of interest like a status change occurs. Client objects register with add_observer and are notified whenever a discipline status change occurs.

add_observer(observer)[source]

Register an observer object interested in observable update events

Parameters

observer – object to be notified

get_statuses()[source]

Get the statuses of all disciplines

Returns

a dictionary of all statuses, keys are the atom ids

remove_all_observers()[source]

Unsubscribe all observers

remove_observer(observer)[source]

Unsubscribe given observer

update(atom)[source]

Notify observers that the corresponding observable object is updated. Observers have to know what to retrieve from the observable object.

Parameters

observable – updated object