Example #1
0
def _prNotifyIn(mypipe):
    shutdown = False
    ni = NotifyIn(
        config.ROOT_SERVER_NAME, {"user": config.NOTIFYIN, "pass": config.NOTIFYIN_PASS, "realm": config.MSG_SERVER}
    )
    while not shutdown:
        try:
            ni.processMsgNoWait()
        except Queue.Empty:
            if not ni.flushToDB():
                time.sleep(1)
        if mypipe.poll():
            shutdown = mypipe.recv()
Example #2
0
def prNotifyIn():
    global core1log
    ni = NotifyIn(config.ROOT_SERVER_NAME,
    {'user': config.NOTIFYIN,
    'pass': config.NOTIFYIN_PASS,
    'realm': config.MSG_SERVER})
    while True:
        try:
            ni.processMsgNoWait()
        except Queue.Empty:
            if not ni.flushToDB():
                time.sleep(1)
                ni.dbKeepAlive()
        except:
            errorstr = traceback.format_exc()
            print errorstr
            core1log.error('<NotifyIn>\n{0}'.format(errorstr))