From bd4556f6c3de7718125f69730847fd7cc22a5eaf Mon Sep 17 00:00:00 2001 From: Tom Wilkie Date: Wed, 24 Jun 2015 11:07:35 +0000 Subject: [PATCH] Add timeout on example client. --- experimental/example/client/client.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/experimental/example/client/client.py b/experimental/example/client/client.py index b54cf8b1c..29e76eb00 100644 --- a/experimental/example/client/client.py +++ b/experimental/example/client/client.py @@ -6,17 +6,18 @@ import logging import sys app = 'http://app:5000/' -concurrency = 1 +concurrency = 2 def do_requests(): s = requests.Session() while True: try: - s.get(app) + s.get(app, timeout=1.0) logging.info("Did request") time.sleep(1) except: logging.error("Error doing request", exc_info=sys.exc_info()) + time.sleep(1) logging.info("Did request") def main():