Пример #1
0
 def run(self, conf):
     queue = Redis(host=conf.redis_host, port=conf.redis_port)
     print queue.conn.keys()
     for i in xrange(0, 50):
         try:
             # Semi-randomly seed the 'sig' key in our fake errors
             FAKE_DATA["sig"] = random.choice(FAKE_SIGS)
             print FAKE_DATA
             encoded = json.dumps(FAKE_DATA)
             err = queue.push(conf.queue_key, encoded)
         except:
             print "Something went wrong storing value from redis"