Skip to content

Commit

Permalink
code modification.
Browse files Browse the repository at this point in the history
  • Loading branch information
anushab97 committed Apr 13, 2022
1 parent 1e775fe commit 902230d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion emitlogsBackend.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
import os
import sys
import platform
import mongodb

# declaring the routing keys for different topics - info/warning/debug
infoKey = f"{platform.node()}.logs.info"
Expand All @@ -21,7 +22,6 @@ def fetchConnection():
rabbitMQ = pika.BlockingConnection(
pika.ConnectionParameters(host=rabbitMQHost, heartbeat=0))
rabbitMQChannel = rabbitMQ.channel()
#print(rabbitMQChannel)
rabbitMQChannel.exchange_declare(exchange='backendlogs', exchange_type='topic')
return rabbitMQChannel, rabbitMQ

Expand Down
2 changes: 1 addition & 1 deletion sampleEmitlogsBackend.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# Step 1: Import emitlogsBackend python file
import emitlogsBackend

# Step 2: Use two variables <var1> and <var2> to fetch connection and rabbitMQ details
# Step 2: Use two variables <var1> and <var2> to fetch "rabbitMQ connection" and "rabbitMQ client" details
rabbitMQChannel, rabbitMQ = emitlogsBackend.fetchConnection()

# Step 3: Use respective function calls to publish your respective info/debug/warning log messages into rabbitMQ backend queue
Expand Down

0 comments on commit 902230d

Please sign in to comment.