From 1389893dd0dd9b854d2fc713ba750ceb870d9108 Mon Sep 17 00:00:00 2001
From: zhiCHang1990 <changzhi2@lenovo.com>
Date: Thu, 6 Jul 2017 15:19:46 +0800
Subject: [PATCH] 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
---
 oslo_messaging/rpc/server.py | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/oslo_messaging/rpc/server.py b/oslo_messaging/rpc/server.py
index bdc5c8d46..c94669f32 100644
--- a/oslo_messaging/rpc/server.py
+++ b/oslo_messaging/rpc/server.py
@@ -73,6 +73,13 @@ complete after the Server has been stopped.
 
 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
     import oslo_messaging
     import time