Is there any nice way to modify the arguments given in the
@task
decorator after that task has been defined? Say I use a task from a collection that and want to use a custom
cache_key_fn
.
It looks like i could do it by
Copy code
from copy import copy
from some_collection import some_task
some_task_cache = copy(some_task)
some_task_cache.cache_key_fn = my_cache_fn
but that seems a bit hacky.
The actual problem is the other way around - I want to provide a collection for users, but they would want to modify the task decorator arguments.
Thanks! Exactly what I need. Yes, it's for Prefect 2.
Maybe it would make sense to put in the Task section of the docs? The Task arguments section only mentions using the decorator
Bring your towel and join one of the fastest growing data communities. Welcome to our second-generation open source orchestration platform, a completely rethought approach to dataflow automation.