Skip to content

Commit

Permalink
Merge pull request #2191 from PrefectHQ/remove-task-tag-from-key
Browse files Browse the repository at this point in the history
Simplify task key to be qualified function name only
  • Loading branch information
cicdw authored Jun 29, 2022
2 parents 22c8dfb + da7a916 commit 970c3c0
Showing 1 changed file with 2 additions and 11 deletions.
13 changes: 2 additions & 11 deletions src/prefect/tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
from prefect.futures import PrefectFuture
from prefect.utilities.asyncio import Async, Sync
from prefect.utilities.callables import get_call_parameters
from prefect.utilities.hashing import hash_objects, stable_hash
from prefect.utilities.hashing import hash_objects
from prefect.utilities.importtools import to_qualified_name

if TYPE_CHECKING:
Expand Down Expand Up @@ -134,16 +134,7 @@ def __init__(
)

self.tags = set(tags if tags else [])

# the task key is a hash of (name, fn, tags)
# which is a stable representation of this unit of work.
# note runtime tags are not part of the task key; they will be
# recorded as metadata only.
self.task_key = stable_hash(
self.name,
to_qualified_name(self.fn),
str(sorted(self.tags or [])),
)
self.task_key = to_qualified_name(self.fn)

self.cache_key_fn = cache_key_fn
self.cache_expiration = cache_expiration
Expand Down

0 comments on commit 970c3c0

Please sign in to comment.