def process(command): user_name = command["user_name"] password = command["password"] print user_name print password client = RedisClient(host='localhost', port=6391) client.select(1) pw = client.hget('user_name', user_name) if pw == password: return reply(True, 10001, 1, command) else: print "password is not right : %r" % user_name return reply(False, 0, 0, command)
def process(command): user_name = command["user_name"] password = command["password"] print user_name print password client = RedisClient(host='localhost', port=6391) client.select(1) pw = client.hget('user_name', user_name) if pw == password: return {"result":True, "user_id":10001, "privilege":1} else: print "password is not right : %r" % user_name return {"result":False, "user_id":0, "privilege":0}