Beispiel #1
0
        continue

        try:
            resp = c.set(key, value)
            pretty_print(resp)
            counter += 1
            print counter
            print '-' * 5
        except Exception as e:
            print e
            print "problem %s" % entry['username']
            print key
            print value
            break

        #if resp is None:
        #    print"trying set"
        #    print c.dht_set(key, value)

# ------------------------------
if __name__ == '__main__':

    test_hash = "3b04c220530154898d02463fba83a235de184936"

    c = Proxy(DEFAULT_SERVER, MIRROR_TCP_PORT, timeout=30)
    pretty_print(c.ping())
    #pretty_print(c.stats())
    result = c.dht_get(test_hash)
    print result
    #pretty_print(result)
    #warmup_mirror()
Beispiel #2
0
        try:
            resp = c.set(key, value)
            pretty_print(resp)
            counter += 1
            print counter
            print '-' * 5
        except Exception as e:
            print e
            print "problem %s" % entry['username']
            print key
            print value
            break

        #if resp is None:
        #    print"trying set"
        #    print c.dht_set(key, value)


# ------------------------------
if __name__ == '__main__':

    test_hash = "3b04c220530154898d02463fba83a235de184936"

    c = Proxy(DEFAULT_SERVER, MIRROR_TCP_PORT, timeout=30)
    pretty_print(c.ping())
    #pretty_print(c.stats())
    result = c.dht_get(test_hash)
    print result
    #pretty_print(result)
    #warmup_mirror()