Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
SMART
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
3
Issues
3
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
UNI-KLU
SMART
Commits
72cf9efd
Commit
72cf9efd
authored
Aug 20, 2019
by
Alexander Lercher
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Trace Retrieval: message handling with working json parser
parent
fd3515f4
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
4 deletions
+7
-4
MessageReceiver.py
modules/messaging/MessageReceiver.py
+6
-3
MessageHandler.py
...ce-retrieval-microservice/app/messaging/MessageHandler.py
+1
-1
No files found.
modules/messaging/MessageReceiver.py
View file @
72cf9efd
...
...
@@ -81,6 +81,9 @@ class MessageReceiver:
def
stop
(
self
):
'''Stops listening for messages and closes the connection'''
self
.
_connection
.
ioloop
.
stop
()
self
.
_connection
.
close
()
LOGGER
.
info
(
f
"RabbitMQ connection closed"
)
\ No newline at end of file
try
:
self
.
_connection
.
ioloop
.
stop
()
self
.
_connection
.
close
()
LOGGER
.
info
(
"RabbitMQ connection closed"
)
except
pika
.
exceptions
.
ConnectionWrongStateError
:
LOGGER
.
warning
(
"RabbitMQ connection already closed"
)
transaction-hub-in/trace-retrieval-microservice/app/messaging/MessageHandler.py
View file @
72cf9efd
...
...
@@ -25,7 +25,7 @@ class MessageHandler:
return
if
message
[
'type'
]
==
'blockchain-transaction'
:
self
.
handle_blockchain_transaction
(
json
.
loads
(
message
[
'content'
])
)
self
.
handle_blockchain_transaction
(
message
[
'content'
]
)
def
handle_blockchain_transaction
(
self
,
transaction
):
self
.
_mongo_repo
.
insert_trace
(
transaction
)
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment