import json
import time
from Queue import Queue
import sys
from redis.sentinel import Sentinel

if __name__ == '__main__':
    # ======Try to connect NEON server
    sentinel=Sentinel([('10.1.33.141', 9001),('10.1.33,141', 9011),('10.1.33.141', 9021)], socket_timeout=0.1)
    #sentinel=Sentinel([('10.1.53.240', 9001),('10.1.53,240', 9011),('10.1.53.240', 9021)], socket_timeout=0.1)
    r=sentinel.master_for('neonmaster', socket_timeout=20, password='sanlie;123')
    #_path="/GPPD/control/command/mantid"
    _path="/GPPD/control/test"
    r.set(_path, sys.argv[1])
