Commit f0de8aa91a96f36df0de3eb73a6de49bf3d30d10

Authored by Wesnydy Ribeiro
1 parent b6a9ff7d
Exists in release

.gitignore file

Showing 2 changed files with 9 additions and 6 deletions   Show diff stats
.gitignore 0 → 100644
... ... @@ -0,0 +1,4 @@
  1 +#general
  2 +*.pyc
  3 +*.log
  4 +log/
... ...
core/PikaManager.py
... ... @@ -13,9 +13,8 @@ E-Mail: caiomcg@gmail.com
13 13 import pika
14 14 import json
15 15  
16   -
17 16 class PikaManager:
18   -
  17 +
19 18 def __init__(self, ip):
20 19 """
21 20 Initialize the class without
... ... @@ -89,14 +88,14 @@ class PikaManager:
89 88 channel.basic_qos(prefetch_count = 1)
90 89 channel.basic_consume(callback, queue = queue_name, no_ack = True)
91 90 channel.start_consuming()
92   - channel.close()
  91 + channel.close()
93 92  
94 93 def get_conn_send(self):
95 94 return self.conn_send
96   -
  95 +
97 96 def get_conn_receive(self):
98 97 return self.conn_receive
99   -
  98 +
100 99 def close_connections(self):
101 100 try:
102 101 self.conn_receive.close()
... ... @@ -105,4 +104,4 @@ class PikaManager:
105 104 pass
106 105 def process_data(self):
107 106 self.conn_send.process_data_events()
108   - self.conn_receive.process_data_events()
109 107 \ No newline at end of file
  108 + self.conn_receive.process_data_events()
... ...