monitoring module¶
Monitoring mechanism to track GEMSEO execution (update events)¶
Classes:
|
This class implements the observer pattern. |
- 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.
Initializes the monitoring.
- Parameters
scenario (MDOScenario) – the scenario to be monitored.
Methods:
add_observer
(observer)Registers an observer object interested in observable update events.
Gets the statuses of all disciplines.
Unsubscribes all observers.
remove_observer
(observer)Unsubscribes the given observer.
update
(atom)Notifies observers that the corresponding observable object is updated.
- add_observer(observer)[source]¶
Registers an observer object interested in observable update events.
- Parameters
observer – object to be notified
- get_statuses()[source]¶
Gets the statuses of all disciplines.
- Returns
a dictionary of all statuses, keys are the atom ids
- Return type
dict