File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 88F = TypeVar ("F" , bound = Callable [..., Awaitable [Any ]])
99
1010
11- def _auto_heartbeater (fn : F ) -> F :
11+ def auto_heartbeater (fn : F ) -> F :
1212 # We want to ensure that the type hints from the original callable are
1313 # available via our wrapper, so we use the functools wraps decorator
1414 @wraps (fn )
Original file line number Diff line number Diff line change 66from temporalio .common import RetryPolicy
77from temporalio .worker import Worker
88
9- from custom_decorator .activity_utils import _auto_heartbeater
9+ from custom_decorator .activity_utils import auto_heartbeater
1010
1111
1212# Here we use our automatic heartbeater decorator. If this wasn't present, our
1313# activity would timeout since it isn't heartbeating.
1414@activity .defn
15- @_auto_heartbeater
15+ @auto_heartbeater
1616async def wait_for_cancel_activity () -> str :
1717 # Wait forever, catch the cancel, and return some value
1818 try :
You can’t perform that action at this time.
0 commit comments