def __init__(self):
     Exporter.__init__(self)
     EventConsumerMixin.__init__(self, self.handle_connected,
                                 self.connection_event_error)
     self.running = 0
     self._scheduled = None
     self._lock = Lock()
Exemple #2
0
 def stop(self):
     self.running = 0
     if self._scheduled is not None:
         try:
             self._scheduled.cancel()
         except:
             pass
     Exporter.stop(self)
 def stop(self):
     self.running = 0
     if self._scheduled is not None:
         try:
             self._scheduled.cancel()
         except:
             pass
     Exporter.stop(self)
 def start(self):
     Exporter.start(self)
     if not self.running:
         self.running = 1
         self.connection = as_node(self.connection_node)
         self._time_keeper = PersistentDataObject(self)
         self._time_keeper.start_time = 0
         self._time_keeper.load()
         self._period = self.parent.parent.period
         self._setup_trigger()
     else: 
         raise EAlreadyRunning
 def start(self):
     Exporter.start(self)
     if not self.running:
         self.running = 1
         self.connection = as_node(self.connection_node)
         self._time_keeper = PersistentDataObject(self)
         self._time_keeper.start_time = 0
         self._time_keeper.load()
         self._period = self.parent.parent.period
         self._setup_trigger()
     else:
         raise EAlreadyRunning
 def start(self):
     Exporter.start(self)
     if not self.running:
         self.running = 1
         self.connection = as_node(self.connection_node)
         self._event_count = self.log_multiple - 1
         self._time_keeper = PersistentDataObject(self)
         self._time_keeper.start_time = 0
         self._time_keeper.load()
         self._period = self.parent.parent.period
         self.parent.parent.event_subscribe(self, LogAddEntryEvent)
     else: 
         raise EAlreadyRunning
Exemple #7
0
 def configure(self, config):
     map_to_attribute(self, "period", 900, config, map_to_seconds)
     if self.period == 0:
         raise EInvalidValue("period", self.period, "Export period cannot be 0")
     set_attribute(self, "debug", 0, config, as_boolean)
     set_attribute(self, "synchronize_on", "00:00", config)
     set_attribute(self, "timeout", 60, config, int)
     set_attribute(self, "connection_node", "/services/network", config)
     set_attribute(self, "connection_attempts", 3, config, int)
     set_attribute(self, "always_export", 0, config, as_boolean)
     set_attribute(self, "breakup_on_period", 0, config, as_boolean)
     Exporter.configure(self, config)
     self._time = _TimeStore(self)
 def start(self):
     Exporter.start(self)
     if not self.running:
         self.running = 1
         self.connection = as_node(self.connection_node)
         self._event_count = self.log_multiple - 1
         self._time_keeper = PersistentDataObject(self)
         self._time_keeper.start_time = 0
         self._time_keeper.load()
         self._period = self.parent.parent.period
         self.parent.parent.event_subscribe(self, LogAddEntryEvent)
     else:
         raise EAlreadyRunning
 def configure(self, config):
     map_to_attribute(self, 'period', 900, config, map_to_seconds)
     if self.period == 0:
         raise EInvalidValue('period', self.period,
                             'Export period cannot be 0')
     set_attribute(self, 'debug', 0, config, as_boolean)
     set_attribute(self, 'synchronize_on', '00:00', config)
     set_attribute(self, 'timeout', 60, config, int)
     set_attribute(self, 'connection_node', '/services/network', config)
     set_attribute(self, 'connection_attempts', 3, config, int)
     set_attribute(self, 'always_export', 0, config, as_boolean)
     set_attribute(self, 'breakup_on_period', 0, config, as_boolean)
     Exporter.configure(self, config)
     self._time = _TimeStore(self)
 def configuration(self):
     config = Exporter.configuration(self)
     get_attribute(self, 'log_multiple', config, str)
     get_attribute(self, 'connection_node', config)
     get_attribute(self, 'connection_attempts', config)
     get_attribute(self, 'timeout', config, int)
     return config
 def configuration(self):
     config = Exporter.configuration(self)
     get_attribute(self,'log_multiple',config,str)
     get_attribute(self,'connection_node',config)
     get_attribute(self,'connection_attempts',config)
     get_attribute(self,'timeout',config,int)
     return config
Exemple #12
0
 def start(self):
     Exporter.start(self)
     if not self.running:
         node = as_node(self.connection_node)
         if hasattr(node, "event_subscribe"):
             node.event_subscribe(self, ConnectionEvent)
         else:
             if self.debug:
                 msg = "Connection node: " + str(self.connection_node) + " is not an event producer."
                 msglog.log("broadway", msglog.types.INFO, msg)
         self.connection = node
         self.running = 1
         self._init_next_time()
         self._schedule()
     else:
         raise EAlreadyRunning
 def start(self):
     Exporter.start(self)
     if not self.running:
         node = as_node(self.connection_node)
         if hasattr(node, 'event_subscribe'):
             node.event_subscribe(self, ConnectionEvent)
         else:
             if self.debug:
                 msg = ('Connection node: ' + str(self.connection_node) +
                        ' is not an event producer.')
                 msglog.log('broadway', msglog.types.INFO, msg)
         self.connection = node
         self.running = 1
         self._init_next_time()
         self._schedule()
     else:
         raise EAlreadyRunning
Exemple #14
0
 def configuration(self):
     config = Exporter.configuration(self)
     map_from_attribute(self, "period", config, map_from_seconds)
     get_attribute(self, "connection_node", config)
     get_attribute(self, "debug", config, str)
     get_attribute(self, "connection_attempts", config)
     get_attribute(self, "timeout", config)
     get_attribute(self, "always_export", config, str)
     get_attribute(self, "synchronize_on", config)
     get_attribute(self, "breakup_on_period", config, str)
     return config
 def configuration(self):
     config = Exporter.configuration(self)
     map_from_attribute(self, 'period', config, map_from_seconds)
     get_attribute(self, 'connection_node', config)
     get_attribute(self, 'debug', config, str)
     get_attribute(self, 'connection_attempts', config)
     get_attribute(self, 'timeout', config)
     get_attribute(self, 'always_export', config, str)
     get_attribute(self, 'synchronize_on', config)
     get_attribute(self, 'breakup_on_period', config, str)
     return config
Exemple #16
0
 def configuration(self):
     config = Exporter.configuration(self)
     get_attribute(self, 'debug', config, str)
     get_attribute(self, 'column', config, str)
     get_attribute(self, 'multi_threaded', config, str)
     return config
Exemple #17
0
 def start(self):
     self.running = 1
     Exporter.start(self)
     return
Exemple #18
0
 def stop(self):
     self.running = 0
     Exporter.stop(self)
 def configure(self, config):
     set_attribute(self, 'log_multiple', 1, config, int)
     set_attribute(self, 'timeout', 60, config, int)
     set_attribute(self, 'connection_node', '/services/network', config)
     set_attribute(self, 'connection_attempts', 3, config, int)
     Exporter.configure(self, config)
 def configure(self, config):
     set_attribute(self,'log_multiple',1,config,int)
     set_attribute(self,'timeout',60,config,int)
     set_attribute(self,'connection_node','/services/network',config)
     set_attribute(self,'connection_attempts',3,config,int)
     Exporter.configure(self, config)
 def __init__(self):
     self.running = 0
     self._lock = Lock()
     Exporter.__init__(self)
     EventConsumerMixin.__init__(self,self.handle_log,self.handle_error)
Exemple #22
0
 def __init__(self):
     Exporter.__init__(self)
     self.running = 0
     self._lock = Lock()
 def __init__(self):
     self.running = 0
     self._lock = Lock()
     Exporter.__init__(self)
     EventConsumerMixin.__init__(self, self.handle_log, self.handle_error)
Exemple #24
0
 def configure(self, config):
     set_attribute(self, 'debug', 0, config, as_boolean)
     set_attribute(self, 'column', 'entry', config)
     set_attribute(self, 'multi_threaded', 1, config, as_boolean)
     Exporter.configure(self, config)
Exemple #25
0
 def configuration(self):
     config = Exporter.configuration(self)
     get_attribute(self,'debug',config,str)
     get_attribute(self,'column',config,str)
     get_attribute(self,'multi_threaded',config,str)
     return config
Exemple #26
0
 def start(self):
     self.running = 1
     Exporter.start(self)
     return
Exemple #27
0
 def configure(self,config):
     set_attribute(self,'debug',0,config,as_boolean)
     set_attribute(self,'column','entry',config)
     set_attribute(self,'multi_threaded',1,config,as_boolean)
     Exporter.configure(self,config)
Exemple #28
0
 def stop(self):
     self.running = 0
     Exporter.stop(self)
Exemple #29
0
 def __init__(self):
     Exporter.__init__(self)
     EventConsumerMixin.__init__(self, self.handle_connected, self.connection_event_error)
     self.running = 0
     self._scheduled = None
     self._lock = Lock()
Exemple #30
0
 def __init__(self):
     Exporter.__init__(self)
     self.running = 0
     self._lock = Lock()