From 1fbe074436f7bd7a4d815625e19862700d0299a6 Mon Sep 17 00:00:00 2001 From: Chad Retz Date: Mon, 17 Jul 2023 09:39:17 -0500 Subject: [PATCH] Catch BaseException in activities Fixes #333 --- temporalio/worker/_activity.py | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/temporalio/worker/_activity.py b/temporalio/worker/_activity.py index 5c22a1b1..223fd3d9 100644 --- a/temporalio/worker/_activity.py +++ b/temporalio/worker/_activity.py @@ -436,12 +436,7 @@ async def _run_activity( completion.result.completed.result.CopyFrom( (await self._data_converter.encode([result]))[0] ) - except ( - Exception, - asyncio.CancelledError, - temporalio.exceptions.CancelledError, - temporalio.activity._CompleteAsyncError, - ) as err: + except BaseException as err: try: if isinstance(err, temporalio.activity._CompleteAsyncError): temporalio.activity.logger.debug("Completing asynchronously")