MCPcopy Create free account
hub / github.com/blacklanternsecurity/bbot / _shutdown

Method _shutdown

bbot/core/engine.py:549–564  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

547 self.engine_debug(f"{self.name}: finished worker()")
548
549 async def _shutdown(self):
550 if not self._shutdown_status:
551 self.log.verbose(f"{self.name}: shutting down...")
552 self._shutdown_status = True
553 await self.cancel_all_tasks()
554 context = getattr(self, "context", None)
555 if context is not None:
556 try:
557 context.destroy(linger=0)
558 except Exception:
559 self.log.trace(traceback.format_exc())
560 try:
561 context.term()
562 except Exception:
563 self.log.trace(traceback.format_exc())
564 self.log.verbose(f"{self.name}: finished shutting down")
565
566 async def task_pool(self, fn, args_kwargs, threads=10, timeout=300, global_kwargs=None):
567 if global_kwargs is None:

Callers 3

workerMethod · 0.95
test_dns_resolutionFunction · 0.80
test_wildcardsFunction · 0.80

Calls 3

cancel_all_tasksMethod · 0.95
verboseMethod · 0.45
traceMethod · 0.45

Tested by 2

test_dns_resolutionFunction · 0.64
test_wildcardsFunction · 0.64