MCPcopy Index your code
hub / github.com/blacklanternsecurity/bbot / queue_outgoing_event

Method queue_outgoing_event

bbot/modules/base.py:1011–1034  ·  view source on GitHub ↗

Queues an outgoing event to the module's outgoing event queue for further processing. The function attempts to put the event into the `outgoing_event_queue` immediately. If it's not possible due to the current state of the module, an AttributeError is raised, and a debug lo

(self, event, **kwargs)

Source from the content-addressed store, hash-verified

1009 self.debug("Not in an acceptable state to queue incoming event")
1010
1011 async def queue_outgoing_event(self, event, **kwargs):
1012 """
1013 Queues an outgoing event to the module's outgoing event queue for further processing.
1014
1015 The function attempts to put the event into the `outgoing_event_queue` immediately.
1016 If it's not possible due to the current state of the module, an AttributeError is raised, and a debug log is generated.
1017
1018 Args:
1019 event: The event object to be queued.
1020 **kwargs: Additional keyword arguments to be associated with the event.
1021
1022 Returns:
1023 None: The function doesn't return anything but modifies the state of the `outgoing_event_queue`.
1024
1025 Examples:
1026 >>> self.queue_outgoing_event(some_outgoing_event, abort_if=lambda e: "unresolved" in e.tags)
1027
1028 Raises:
1029 AttributeError: If the module is not in an acceptable state to queue outgoing events.
1030 """
1031 try:
1032 await self.outgoing_event_queue.put((event, kwargs))
1033 except AttributeError:
1034 self.debug("Not in an acceptable state to queue outgoing event")
1035
1036 def set_error_state(self, message=None, clear_outgoing_queue=False, critical=False):
1037 """

Callers 1

emit_eventMethod · 0.95

Calls 1

debugMethod · 0.95

Tested by

no test coverage detected