- # find client, update config, etc.
- ci = ipaddr(request.args['i'])
- c = clients[ci]
- pw = request.args['pw']
- if pw != c.pw: raise ValueError('bad password')
-
- # update config
- for r, w in (('mbd', 'max_batch_down'),
- ('mqt', 'max_queue_time'),
- ('mrt', 'max_request_time'),
- ('tro', 'target_requests_outstanding')):
- try: v = request.args[r]
- except KeyError: continue
- v = int(v)
- c.__dict__[w] = v
-
- try: d = request.args['d']
- except KeyError: d = ''
-
- c.process_arriving_data(d)
- c.new_request(request)
-