Commit ade939a3 authored by Federico Sismondi's avatar Federico Sismondi
Browse files

added some comments and debug lines, there are some ongoing problems with pcap...

added some comments and debug lines, there are some ongoing problems with pcap dumper py2 support, DO NOT MERGE YET
parent e4de14fb
......@@ -171,9 +171,11 @@ For more information, visit: http://doc.f-interop.eu
p.start()
# TODO re-implement with kombu and BaseController/CoreConsumer
if dump:
dump_p = multiprocessing.Process(target=launch_amqp_data_to_pcap_dumper, args=())
dump_p.start()
# TODO fix pcap_dumper support for py2, python3 -m utils.packet_dumper works fine tho
# if dump:
# dump_p = multiprocessing.Process(target=launch_amqp_data_to_pcap_dumper, args=())
# dump_p.start()
def run(self):
self.cli()
......
......@@ -270,13 +270,13 @@ class AmqpDataPacketDumper:
m = Message.from_json(body)
m.update_properties(**props_dict)
logger.info('got event: %s' % type(m))
if isinstance(m, MsgTestingToolTerminate):
ch.stop_consuming()
self.stop()
if isinstance(m, MsgPacketSniffedRaw):
print(repr(m))
self.dump_packet(m)
......@@ -319,4 +319,4 @@ if __name__ == '__main__':
for i in range(1, 1000):
time.sleep(1)
print(i)
p.join()
p.join()
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment