We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent bdf2e10 commit 325b81cCopy full SHA for 325b81c
python/rpc_client.py
@@ -32,10 +32,8 @@ def call(self, n):
32
self.channel.start_consuming()
33
return int(self.response)
34
35
-
36
fibonacci_rpc = FibonacciRpcClient()
37
38
print " [x] Requesting fib(30)"
39
response = fibonacci_rpc.call(30)
40
print " [.] Got %r" % (response,)
41
python/rpc_server.py
@@ -1,16 +1,13 @@
1
#!/usr/bin/env python
2
import pika
3
4
5
connection = pika.BlockingConnection(pika.ConnectionParameters(
6
host='localhost'))
7
8
channel = connection.channel()
9
10
11
channel.queue_declare(queue='rpc_queue')
12
13
14
def fib(n):
15
if n == 0:
16
return 0
0 commit comments