Example #1
0
    r.hset('command','message',command)
    r.hset('command','gateway','slack')
    r.hset('command','channel',channel)
    r.hset('command','sender',slackid)
    r.rpush('inQ','command')

    return ""

@app.route("/oauth2callback")
def oauth():
    print "GMAIL AUTH"
    return ""

@app.route("/ping", methods=['POST'])
def ping():
    print "PONG"
    msguser = request.form.get("text","")
    print msguser
    return ""
    
if __name__ == "__main__":
    r = redis.StrictRedis(host='localhost',port=6379,db=0)

    coreThread = core.core(r)
    listenThread = core.listen(r)
 
    coreThread.start()      
    listenThread.start()  

    app.run(debug=True, host = '0.0.0.0', port=5555)
Example #2
0
    r.hset('command', 'channel', channel)
    r.hset('command', 'sender', slackid)
    r.rpush('inQ', 'command')

    return ""


@app.route("/oauth2callback")
def oauth():
    print "GMAIL AUTH"
    return ""


@app.route("/ping", methods=['POST'])
def ping():
    print "PONG"
    msguser = request.form.get("text", "")
    print msguser
    return ""


if __name__ == "__main__":
    r = redis.StrictRedis(host='localhost', port=6379, db=0)

    coreThread = core.core(r)
    listenThread = core.listen(r)

    coreThread.start()
    listenThread.start()

    app.run(debug=True, host='0.0.0.0', port=5555)
Example #3
0
    r.hset('command','sender',slackid)
    r.rpush('inQ','command')

    return ""

@app.route("/oauth2callback")
def oauth():
    print "GMAIL AUTH"
    return ""

@app.route("/ping", methods=['POST'])
def ping():
    print "PONG"
    msguser = request.form.get("text","")
    print msguser
    return ""
    
if __name__ == "__main__":
    r = redis.StrictRedis(host='localhost',port=6379,db=0)

    lock = threading.Lock()

    #sendThread = core.send(r,lock)
    coreThread = core.core(r)
    listenThread = core.listen(r,lock)

    #sendThread.start()    
    coreThread.start()      
    listenThread.start()  

    app.run(debug=True, host = '0.0.0.0')
Example #4
0
    return ""


@app.route("/oauth2callback")
def oauth():
    print "GMAIL AUTH"
    return ""


@app.route("/ping", methods=['POST'])
def ping():
    print "PONG"
    msguser = request.form.get("text", "")
    print msguser
    return ""


if __name__ == "__main__":
    r = redis.StrictRedis(host='localhost', port=6379, db=0)

    lock = threading.Lock()

    #sendThread = core.send(r,lock)
    coreThread = core.core(r)
    listenThread = core.listen(r, lock)

    #sendThread.start()
    coreThread.start()
    listenThread.start()

    app.run(debug=True, host='0.0.0.0')