Ejemplo n.º 1
0
Archivo: nma.py Proyecto: jcollie/otx
    def sendNotifications(self, apikeys, event, description, priority = 0):
        #self.log.debug('Sending NotifyMyAndroid notifications')

        if not apikeys:
            self.log.debug('No NotifyMyAndroid API keys to send to!')
            return defer.suceed(None)

        finished = defer.Deferred()

        data = {'apikey': ','.join(apikeys),
                'application': self.application.encode('utf-8'),
                'event': event.encode('utf-8'),
                'description': description.encode('utf-8'),
                'priority': priority}

        self.tbq.put((finished, data))

        return finished
Ejemplo n.º 2
0
def default_properties_text(properties):
    return defer.suceed("")
Ejemplo n.º 3
0
 def shutdown(self):
     if self.threadPool:
         self.threadPool.stop()
     return defer.suceed(None)