File tree Expand file tree Collapse file tree 2 files changed +7
-0
lines changed Expand file tree Collapse file tree 2 files changed +7
-0
lines changed Original file line number Diff line number Diff line change 55
66from __future__ import annotations
77
8+ import logging
89from dataclasses import dataclass
910from typing import (
1011 TYPE_CHECKING ,
4243)
4344from temporalio .bridge .temporal_sdk_bridge import PollShutdownError # type: ignore
4445
46+ logger = logging .getLogger (__name__ )
4547
4648@dataclass
4749class WorkerConfig :
@@ -219,6 +221,8 @@ async def poll_activity_task(
219221 self ,
220222 ) -> temporalio .bridge .proto .activity_task .ActivityTask :
221223 """Poll for an activity task."""
224+ logger .info ("Polling for activity task" )
225+
222226 return temporalio .bridge .proto .activity_task .ActivityTask .FromString (
223227 await self ._ref .poll_activity_task ()
224228 )
Original file line number Diff line number Diff line change @@ -169,10 +169,13 @@ async def raise_from_exception_queue() -> NoReturn:
169169 else :
170170 raise RuntimeError (f"Unrecognized activity task: { task } " )
171171 except temporalio .bridge .worker .PollShutdownError : # type: ignore[reportPrivateLocalImportUsage]
172+ logger .info ("Activity worker finished1" )
172173 exception_task .cancel ()
174+ logger .info ("Activity worker finished2" )
173175 return
174176 except Exception as err :
175177 exception_task .cancel ()
178+ logger .info ("Activity worker failed: %s" , err )
176179 raise RuntimeError ("Activity worker failed" ) from err
177180
178181 def notify_shutdown (self ) -> None :
You can’t perform that action at this time.
0 commit comments