comparison py/configwaiter.py @ 557:830ee5663703

increase waiter timeout
author Matt Johnston <matt@ucc.asn.au>
date Tue, 09 Jun 2015 23:37:49 +0800
parents c5f8375b12a2
children 654caee52c83
comparison
equal deleted inserted replaced
556:c5f8375b12a2 557:830ee5663703
34 r = yield from asyncio.wait_for( 34 r = yield from asyncio.wait_for(
35 self.http_session.get(config.SETTINGS_URL, headers=headers), 35 self.http_session.get(config.SETTINGS_URL, headers=headers),
36 300) 36 300)
37 D("waiter status %d" % r.status) 37 D("waiter status %d" % r.status)
38 if r.status == 200: 38 if r.status == 200:
39 rawresp = yield from asyncio.wait_for(r.text(), 300) 39 rawresp = yield from asyncio.wait_for(r.text(), 600)
40 40
41 resp = utils.json_load_round_float(rawresp) 41 resp = utils.json_load_round_float(rawresp)
42 42
43 self.epoch_tag = resp['epoch_tag'] 43 self.epoch_tag = resp['epoch_tag']
44 D("waiter got epoch tag %s" % self.epoch_tag) 44 D("waiter got epoch tag %s" % self.epoch_tag)
50 else: 50 else:
51 # longer timeout to avoid spinning 51 # longer timeout to avoid spinning
52 yield from asyncio.sleep(30) 52 yield from asyncio.sleep(30)
53 53
54 except Exception as e: 54 except Exception as e:
55 E("Error watching config: %s" % str(e)) 55 EX("Error watching config: %s" % str(e))
56 56
57 57
58 58
59 59