Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def tearDown(self): # noqa: N802
pykka.ActorRegistry.stop_all()
def tearDown(self): # noqa: N802
pykka.ActorRegistry.stop_all()
actor.LocalBackend.libraries = []
def tearDown(self): # noqa: N802
pykka.ActorRegistry.stop_all()
shutil.rmtree(self.temp_dir)
def poupool_actor():
yield MyPoupoolActor.start().proxy()
pykka.ActorRegistry.stop_all()
def tearDown(self): # noqa: N802
pykka.ActorRegistry.stop_all()
def tearDown(self): # noqa: N802
pykka.ActorRegistry.stop_all()
def tearDown(self): # noqa: N802
pykka.ActorRegistry.stop_all()
envelope.reply_to.set_exception()
else:
self._handle_failure(*sys.exc_info())
try:
self.on_failure(*sys.exc_info())
except Exception:
self._handle_failure(*sys.exc_info())
except BaseException:
exception_value = sys.exc_info()[1]
logger.debug(
'{!r} in {}. Stopping all actors.'.format(
exception_value, self
)
)
self._stop()
ActorRegistry.stop_all()
while not self.actor_inbox.empty():
envelope = self.actor_inbox.get()
if envelope.reply_to is not None:
if isinstance(envelope.message, messages._ActorStop):
envelope.reply_to.set(None)
else:
envelope.reply_to.set_exception(
exc_info=(
ActorDeadError,
ActorDeadError(
'{} stopped before handling the message'.format(
self.actor_ref
)
),
None,