Skip to content

Commit

Permalink
Don't use class attributes for mutable workflow state (#509)
Browse files Browse the repository at this point in the history
  • Loading branch information
dandavison authored Jul 10, 2024
1 parent 6d0cc91 commit 71fcce8
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 4 deletions.
3 changes: 2 additions & 1 deletion features/update/basic/feature.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@

@workflow.defn
class Workflow:
am_done = False
def __init__(self) -> None:
self.am_done = False

@workflow.run
async def run(self) -> str:
Expand Down
3 changes: 2 additions & 1 deletion features/update/self/feature.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@

@workflow.defn
class Workflow:
am_done = False
def __init__(self) -> None:
self.am_done = False

@workflow.run
async def run(self) -> str:
Expand Down
3 changes: 2 additions & 1 deletion features/update/task_failure/feature.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@

@workflow.defn
class Workflow:
am_done = False
def __init__(self) -> None:
self.am_done = False

@workflow.run
async def run(self) -> str:
Expand Down
3 changes: 2 additions & 1 deletion features/update/validation_replay/feature.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@

@workflow.defn
class Workflow:
am_done = False
def __init__(self) -> None:
self.am_done = False

@workflow.run
async def run(self) -> str:
Expand Down

0 comments on commit 71fcce8

Please sign in to comment.