monitoringtime

class pilot.util.monitoringtime.MonitoringTime[source]

A simple class to store the various monitoring task times. Different monitoring tasks should be executed at different intervals. An object of this class is used to store the time when a specific monitoring task was last executed. The actual time interval for a given monitoring tasks is stored in the util/default.cfg file.

__dict__ = mappingproxy({'__module__': 'pilot.util.monitoringtime', '__doc__': '\n    A simple class to store the various monitoring task times.\n    Different monitoring tasks should be executed at different intervals. An object of this class is used to store\n    the time when a specific monitoring task was last executed. The actual time interval for a given monitoring tasks\n    is stored in the util/default.cfg file.\n    ', '__init__': <function MonitoringTime.__init__>, 'update': <function MonitoringTime.update>, 'get': <function MonitoringTime.get>, '__dict__': <attribute '__dict__' of 'MonitoringTime' objects>, '__weakref__': <attribute '__weakref__' of 'MonitoringTime' objects>, '__annotations__': {}})
__init__()[source]

Return the initial MonitoringTime object with the current time as start values.

__module__ = 'pilot.util.monitoringtime'
__weakref__

list of weak references to the object (if defined)

get(key)[source]

Return the value for the given key. Usage: mt=MonitoringTime()

mt.get(‘ct_proxy’)

The method throws an AttributeError in case of no such key.

Parameters:

key – name of key (string).

Returns:

key value (int).

update(key, modtime=None)[source]

Update a given key with the current time or given time. Usage: mt=MonitoringTime()

mt.update(‘ct_proxy’)

Parameters:
  • key – name of key (string).

  • modtime – modification time (int).

Returns: