|
park ::
core ::
monitor ::
Monitor ::
Class Monitor
|
|
Class Monitor
source code
Messages that are received during the processing of the job.
Standard message types:
`Started`, `Progress`, `Improved`, `Completed`,
`Error`, `Aborted`, `Log`
Specific job types may have their own monitor messages.
The messages themselves should all produce nicely formatted results
in response to str(message).
The message dispatch calls on<Class>(message) if the on<Class>
method exists for the message type. If not, then dispatch
calls otherwise(message). By default onLog(message) submits the
log record to the logger.
Subclass Monitor to define your own behaviours.
|
|
put(self,
message)
Called from thread when new message has arrived. |
source code
|
|
|
|
|
|
|
|
|
Inherited from object:
__delattr__,
__getattribute__,
__hash__,
__init__,
__new__,
__reduce__,
__reduce_ex__,
__repr__,
__setattr__,
__str__
|
|
Inherited from object:
__class__
|
|
What to do if the message handler is not found.
Default is to ignore the message.
|
|
Called when the job sends a logging record.
The logging record contains a normal python logging record.
The default behaviour is to tie into the application logging
system using:
logger = logging.getLogger(message.record.name)
logger.handle(message.record)
Logging levels are set in the job controller.
|