MCPcopy Create free account
hub / github.com/decodableco/examples / consume

Method consume

osquery/consumer.py:11–22  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

9 self.consumer = self.client.subscribe(topic, consumer)
10
11 def consume(self):
12 waitingForMsg = True
13 while waitingForMsg:
14 try:
15 msg = self.consumer.receive(2000)
16 print("Received message '{}' id='{}'".format(msg.data(), msg.message_id()))
17 self.consumer.acknowledge(msg)
18
19 # waitingForMsg = False
20 except:
21 time.sleep(1)
22 continue
23
24
25 def __del__(self):

Callers 1

consumer.pyFile · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected