Skip to content

Commit

Permalink
Rename env var and change output to make it clear it's coming from DI…
Browse files Browse the repository at this point in the history
…SPATCH
  • Loading branch information
chriso committed Mar 10, 2024
1 parent 7ef0203 commit 5d8f846
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ serializable. That is, users should avoid using variables inside
coroutines that cannot be pickled.

If a pickle error is encountered, serialization tracing can be enabled
with the `DURABLE_TRACE=1` environment variable to debug the issue. The
with the `DISPATCH_TRACE=1` environment variable to debug the issue. The
stacks of coroutines and generators will be printed to stdout before
the pickle library attempts serialization.

Expand Down
4 changes: 2 additions & 2 deletions src/dispatch/experimental/durable/function.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
from . import frame as ext
from .registry import RegisteredFunction, lookup_function, register_function

TRACE = os.getenv("DURABLE_TRACE", False)
TRACE = os.getenv("DISPATCH_TRACE", False)

FRAME_CLEARED = 4

Expand Down Expand Up @@ -114,7 +114,7 @@ def __getstate__(self):
ip, sp, stack = None, None, None

if TRACE:
print(f"\n[DURABLE] Serializing {self}:")
print(f"\n[DISPATCH] Serializing {self}:")
print(f"function = {rfn.fn.__qualname__} ({rfn.filename}:{rfn.lineno})")
print(f"code hash = {rfn.hash}")
print(f"args = {self.args}")
Expand Down

0 comments on commit 5d8f846

Please sign in to comment.