Skip to content

Commit 85f2245

Browse files
committed
rename decorator
1 parent af7d2b8 commit 85f2245

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

reflex/state.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@
6060
)
6161
from reflex.utils.exceptions import ImmutableStateError as ImmutableStateError
6262
from reflex.utils.exec import is_testing_env
63-
from reflex.utils.monitoring import is_pyleak_enabled, monitor_leaks
63+
from reflex.utils.monitoring import is_pyleak_enabled, monitor_loopblocks
6464
from reflex.utils.types import _isinstance, is_union, value_inside_optional
6565
from reflex.vars import Field, VarData, field
6666
from reflex.vars.base import (
@@ -1787,7 +1787,7 @@ async def _process_event(
17871787
# Get the function to process the event.
17881788
if is_pyleak_enabled():
17891789
console.debug(f"Monitoring leaks for handler: {handler.fn.__qualname__}")
1790-
fn = functools.partial(monitor_leaks(handler.fn), state)
1790+
fn = functools.partial(monitor_loopblocks(handler.fn), state)
17911791
else:
17921792
fn = functools.partial(handler.fn, state)
17931793

reflex/utils/monitoring.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -93,24 +93,24 @@ async def monitor_async():
9393

9494

9595
@overload
96-
def monitor_leaks(
96+
def monitor_loopblocks(
9797
func: Callable[..., AsyncGenerator[YieldType, ReturnType]],
9898
) -> Callable[..., AsyncGenerator[YieldType, ReturnType]]: ...
9999

100100

101101
@overload
102-
def monitor_leaks(
102+
def monitor_loopblocks(
103103
func: Callable[..., Generator[YieldType, SendType, ReturnType]],
104104
) -> Callable[..., Generator[YieldType, SendType, ReturnType]]: ...
105105

106106

107107
@overload
108-
def monitor_leaks(
108+
def monitor_loopblocks(
109109
func: Callable[..., Awaitable[ReturnType]],
110110
) -> Callable[..., Awaitable[ReturnType]]: ...
111111

112112

113-
def monitor_leaks(func: Callable) -> Callable:
113+
def monitor_loopblocks(func: Callable) -> Callable:
114114
"""Framework decorator using the monitoring module's context manager.
115115
116116
Args:

0 commit comments

Comments
 (0)