Add monkey_patch to demo code.
The RPC server code can not work if we don't add eventlet.monkey_patch() at the begining. Change-Id: I65a162a427fb5615c95a70e6d1bbec899a78f231
This commit is contained in:
parent
b36cfac525
commit
1389893dd0
|
@ -73,6 +73,13 @@ complete after the Server has been stopped.
|
||||||
|
|
||||||
A simple example of an RPC server with multiple endpoints might be::
|
A simple example of an RPC server with multiple endpoints might be::
|
||||||
|
|
||||||
|
# NOTE(changzhi): We are using eventlet executor and
|
||||||
|
# time.sleep(1), therefore, the server code needs to be
|
||||||
|
# monkey-patched.
|
||||||
|
|
||||||
|
import eventlet
|
||||||
|
eventlet.monkey_patch()
|
||||||
|
|
||||||
from oslo_config import cfg
|
from oslo_config import cfg
|
||||||
import oslo_messaging
|
import oslo_messaging
|
||||||
import time
|
import time
|
||||||
|
|
Loading…
Reference in New Issue