diff --git a/bbot/core/engine.py b/bbot/core/engine.py index c3897cbef..d8dd1af28 100644 --- a/bbot/core/engine.py +++ b/bbot/core/engine.py @@ -310,7 +310,7 @@ async def new_socket(self): async def shutdown(self): if not self._shutdown_status: self._shutdown_status = True - self.log.hugewarning(f"{self.name}: shutting down...") + self.log.verbose(f"{self.name}: shutting down...") # send shutdown signal await self.send_shutdown_message() # then terminate context @@ -513,7 +513,7 @@ async def worker(self): async def _shutdown(self): if not self._shutdown_status: - self.log.critical(f"{self.name}: shutting down...") + self.log.verbose(f"{self.name}: shutting down...") self._shutdown_status = True await self.cancel_all_tasks() try: diff --git a/bbot/scanner/manager.py b/bbot/scanner/manager.py index 074d6f6a1..ad722f4fc 100644 --- a/bbot/scanner/manager.py +++ b/bbot/scanner/manager.py @@ -215,13 +215,15 @@ async def handle_event(self, event, **kwargs): # if we discovered something interesting from an internal event, # make sure we preserve its chain of parents parent = event.parent - if parent.internal and ((not event.internal) or event._graph_important): + event_is_graph_worthy = (not event.internal) or event._graph_important + parent_is_graph_worthy = (not parent.internal) or parent._graph_important + if event_is_graph_worthy and not parent_is_graph_worthy: parent_in_report_distance = parent.scope_distance <= self.scan.scope_report_distance if parent_in_report_distance: parent.internal = False if not parent._graph_important: parent._graph_important = True - log.debug(f"Re-queuing internal event {parent} with parent {event}") + log.debug(f"Re-queuing internal event {parent} with parent {event} to prevent graph orphan") await self.emit_event(parent) abort_result = False