Package bosco :: Module observer :: Class TriggerEventObserver
[hide private]
[frames] | no frames]

Class TriggerEventObserver

source code

   object --+    
            |    
EventObserver --+
                |
               TriggerEventObserver

Observes an Event for new data (e.g. new punches). This implementation uses triggers and a log table to also get notified of changed values.


Warning: This will rollback the store every <intervall> seconds!

Instance Methods [hide private]
 
__init__(self, store, interval=5, rollback=True)
x.__init__(...) initializes x; see help(type(x)) for signature
source code
 
observe(self)
Does the actual observation.
source code

Inherited from EventObserver: register, stop, unregister

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Class Variables [hide private]
  _tables = {Punch: EventObserver._punch_notify, Run: EventObser...
Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, store, interval=5, rollback=True)
(Constructor)

source code 

x.__init__(...) initializes x; see help(type(x)) for signature

Parameters:
  • interval - Check interval
  • rollback - Rollback store before checking for new objects? This is necessary to get new objects added by other connections but it resets all uncommited changes.
Overrides: object.__init__

observe(self)

source code 

Does the actual observation.

Overrides: EventObserver.observe

Class Variable Details [hide private]

_tables

Value:
{Punch: EventObserver._punch_notify, Run: EventObserver._run_notify, T\
eam: EventObserver._team_notify,}