コード例 #1
0
ファイル: __init__.py プロジェクト: auduny/chains
 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)
コード例 #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)
コード例 #3
0
ファイル: __init__.py プロジェクト: olekenneth/chains
 def __init__(self, id):
     log.info('Starting manager')
     AmqpDaemon.__init__(self, 'manager', id)
コード例 #4
0
ファイル: __init__.py プロジェクト: auduny/chains
 def __init__(self, config):
     AmqpDaemon.__init__(self, 'service', config.get('id')) #, sendHeartBeat=True)
     self.config = config
     self.eventThread = None
     self.actionThread = None
     self.onInit()
コード例 #5
0
ファイル: __init__.py プロジェクト: auduny/chains
 def sendEvent(self, key, data, deviceAttributes=None):
     AmqpDaemon.sendEvent(self, key, data, deviceAttributes)
コード例 #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()
コード例 #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)
コード例 #8
0
ファイル: __init__.py プロジェクト: olekenneth/chains
 def __init__(self, id):
     log.info('Starting manager')
     AmqpDaemon.__init__(self, 'manager', id)