Skip to content

Commit ba9ec0d

Browse files
committed
bug fixed
1 parent 7bca651 commit ba9ec0d

6 files changed

Lines changed: 11 additions & 3 deletions

File tree

bigbang/api/hooks.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ class RPCHook(hooks.PecanHook):
6464
"""Attach the rpcapi object to the request so controllers can get to it."""
6565

6666
def before(self, state):
67-
state.request.rpcapi = bigbang_api.API(context=state.request.context, topic='bigbang-controller')
67+
state.request.rpcapi = bigbang_api.API(context=state.request.context)
6868

6969

7070
class NoExceptionTracebackHook(hooks.PecanHook):

bigbang/api/hooks.pyc

-39 Bytes
Binary file not shown.

bigbang/controller/api.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,13 @@
1+
from oslo_log import log as logging
12
from bigbang.common import rpc_service
23

4+
LOG = logging.getLogger(__name__)
35

46
class API(rpc_service.API):
57
def __init__(self, transport=None, context=None, topic=None):
68
super(API, self).__init__(
7-
transport, context, topic=topic)
9+
transport, context, topic='bigbang-controller')
810

911
def get_all_person(self):
10-
self._call('get_all_person')
12+
LOG.info('send to MQ')
13+
return self._call('get_all_person')

bigbang/controller/api.pyc

168 Bytes
Binary file not shown.

bigbang/controller/manager.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
from oslo_log import log as logging
2+
3+
LOG = logging.getLogger(__name__)
4+
15
class Manager(object):
26
def get_all_person(self, context):
7+
LOG.info('get message from MQ')
38
return "there is no person"

bigbang/controller/manager.pyc

163 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)