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 @@ @@ -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,9 +13,8 @@ E-Mail: caiomcg@gmail.com
13 import pika 13 import pika
14 import json 14 import json
15 15
16 -  
17 class PikaManager: 16 class PikaManager:
18 - 17 +
19 def __init__(self, ip): 18 def __init__(self, ip):
20 """ 19 """
21 Initialize the class without 20 Initialize the class without
@@ -89,14 +88,14 @@ class PikaManager: @@ -89,14 +88,14 @@ class PikaManager:
89 channel.basic_qos(prefetch_count = 1) 88 channel.basic_qos(prefetch_count = 1)
90 channel.basic_consume(callback, queue = queue_name, no_ack = True) 89 channel.basic_consume(callback, queue = queue_name, no_ack = True)
91 channel.start_consuming() 90 channel.start_consuming()
92 - channel.close() 91 + channel.close()
93 92
94 def get_conn_send(self): 93 def get_conn_send(self):
95 return self.conn_send 94 return self.conn_send
96 - 95 +
97 def get_conn_receive(self): 96 def get_conn_receive(self):
98 return self.conn_receive 97 return self.conn_receive
99 - 98 +
100 def close_connections(self): 99 def close_connections(self):
101 try: 100 try:
102 self.conn_receive.close() 101 self.conn_receive.close()
@@ -105,4 +104,4 @@ class PikaManager: @@ -105,4 +104,4 @@ class PikaManager:
105 pass 104 pass
106 def process_data(self): 105 def process_data(self):
107 self.conn_send.process_data_events() 106 self.conn_send.process_data_events()
108 - self.conn_receive.process_data_events()  
109 \ No newline at end of file 107 \ No newline at end of file
  108 + self.conn_receive.process_data_events()