Skip to content

Commit 282d549

Browse files
committed
revert auto_heartbeater annotation change
1 parent 2bd9358 commit 282d549

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

custom_decorator/activity_utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
F = 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)

custom_decorator/worker.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,13 @@
66
from temporalio.common import RetryPolicy
77
from 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
1616
async def wait_for_cancel_activity() -> str:
1717
# Wait forever, catch the cancel, and return some value
1818
try:

0 commit comments

Comments
 (0)