HWRF  trunk@4391
Public Member Functions | Public Attributes | List of all members
produtil.dbnalert.DBNAlert Class Reference

This class represents a call to dbn_alert, as a callable Python object. More...

Detailed Description

This class represents a call to dbn_alert, as a callable Python object.

It allows the instructions on how to make the call to be stored for later use by a produtil.datastore.Product object's add_callback and call_callbacks functions.

Definition at line 47 of file dbnalert.py.

Inheritance diagram for produtil.dbnalert.DBNAlert:

Public Member Functions

def __init__
 Create a new DBNAlert object that can be used to send an alert later on. More...
 
def __call__ (self, kwargs)
 Expands strings specified in the constructor and calls dbn_alert with the results. More...
 

Public Attributes

 alert_args
 Array of arguments to the alert function.
 
 alert_exe
 Alert executable.
 
 loglevel
 Desired logging level. More...
 

Constructor & Destructor Documentation

def produtil.dbnalert.DBNAlert.__init__ (   self,
  args,
  loglevel = logging.WARNING,
  alert_exe = None 
)

Create a new DBNAlert object that can be used to send an alert later on.

Parameters
argsThe arguments to dbn_alert.
alert_exeThe dbn_alert executable name.
loglevelA Python logging level to log messages before each alert.

Definition at line 52 of file dbnalert.py.

Member Function Documentation

def produtil.dbnalert.DBNAlert.__call__ (   self,
  kwargs 
)

Expands strings specified in the constructor and calls dbn_alert with the results.

If dbn alerts are disabled, then the fact that a dbn alert would be run is logged, but dbn_alert is NOT called.

Parameters
kwargsstring formatting variables for the dbn alert arguments

Definition at line 79 of file dbnalert.py.

Member Data Documentation

produtil.dbnalert.DBNAlert.loglevel

Desired logging level.

Definition at line 69 of file dbnalert.py.

Referenced by produtil.dbnalert.DBNAlert.__call__().


The documentation for this class was generated from the following file: