Skip to content

Commit

Permalink
Address review comments
Browse files Browse the repository at this point in the history
  • Loading branch information
derekahuang committed Sep 9, 2024
1 parent 9b323be commit 2c7ea8c
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
2 changes: 1 addition & 1 deletion src/prefect/client/schemas/objects.py
Original file line number Diff line number Diff line change
Expand Up @@ -306,7 +306,7 @@ def is_cancelling(self) -> bool:
return self.type == StateType.CANCELLING

def is_cached(self) -> bool:
return self.name == "Cached"
return self.name == "Cached" and self.type == StateType.COMPLETED

def is_final(self) -> bool:
return self.type in {
Expand Down
1 change: 0 additions & 1 deletion src/prefect/engine.py
Original file line number Diff line number Diff line change
Expand Up @@ -2123,7 +2123,6 @@ async def tick():
)

if run_on_completion_hooks_on_cached:
task_run = await client.read_task_run(task_run.id)
await _run_task_hooks(
task=task,
task_run=task_run,
Expand Down

0 comments on commit 2c7ea8c

Please sign in to comment.