Browse Source

Updated client to send more then one request at a time.

Steve Thielemann 5 years ago
parent
commit
4e1e344edf
2 changed files with 5 additions and 3 deletions
  1. 1 0
      .gitignore
  2. 4 3
      rpc_client.py

+ 1 - 0
.gitignore

@@ -7,3 +7,4 @@ pyvenv.cfg
 pip-selfcheck.json
 .vscode
 rabbitmq-data
+*.swp

+ 4 - 3
rpc_client.py

@@ -39,6 +39,7 @@ class FibonacciRpcClient(object):
 
 fibonacci_rpc = FibonacciRpcClient()
 
-print(" [x] Requesting fib(30)")
-response = fibonacci_rpc.call(30)
-print(" [.] Got %r" % response)
+for n in range(10,30, 5):
+    print(" [x] Requesting fib({0})".format(n))
+    response = fibonacci_rpc.call(n)
+    print(" [.] Got %r" % response)