Exemple #1
0
 def shutdown(self):
     AmqpDaemon.shutdown(self)
     #log.info('Shutdown called')
     #self._shutdown = True
     # Send an action message to ourself to make sure
     # we break out of the wait-loop for actions asap.
     #log.info('Send _shutdown action')
     #self.sendShutdownAction()
     #log.info('Wait 0.5')
     time.sleep(0.5)
     log.info('Joining actionThread')
     if self.actionThread:
         try:
             self.actionThread.join()
         except RuntimeError, e:
             log.warn('Ignoring exception about joining actionThread: %s' % e)
Exemple #2
0
 def shutdown(self):
     AmqpDaemon.shutdown(self)
     #log.info('Shutdown called')
     #self._shutdown = True
     # Send an action message to ourself to make sure
     # we break out of the wait-loop for actions asap.
     #log.info('Send _shutdown action')
     #self.sendShutdownAction()
     #log.info('Wait 0.5')
     time.sleep(0.5)
     log.info('Joining actionThread')
     if self.actionThread:
         try:
             self.actionThread.join()
         except RuntimeError, e:
             log.warn('Ignoring exception about joining actionThread: %s' % e)
Exemple #3
0
 def __init__(self, id):
     log.info('Starting manager')
     AmqpDaemon.__init__(self, 'manager', id)
Exemple #4
0
 def __init__(self, config):
     AmqpDaemon.__init__(self, 'service', config.get('id')) #, sendHeartBeat=True)
     self.config = config
     self.eventThread = None
     self.actionThread = None
     self.onInit()
Exemple #5
0
 def sendEvent(self, key, data, deviceAttributes=None):
     AmqpDaemon.sendEvent(self, key, data, deviceAttributes)
Exemple #6
0
 def __init__(self, config):
     AmqpDaemon.__init__(self, 'service', config.get('id')) #, sendHeartBeat=True)
     self.config = config
     self.eventThread = None
     self.actionThread = None
     self.onInit()
Exemple #7
0
 def sendEvent(self, key, data, deviceAttributes={}):
     # add the service class to all events from that class
     deviceAttributes['class'] = self.config.get('class')
     AmqpDaemon.sendEvent(self, key, data, deviceAttributes)
Exemple #8
0
 def __init__(self, id):
     log.info('Starting manager')
     AmqpDaemon.__init__(self, 'manager', id)