@task(...)
Decorator used to turn a function into a Prism task.
Decorator used to turn a function into a Prism task.
prism.decorators.task(
*, retries: int = 0, retry_delay_seconds: int = 0, targets: List[Callable] = []
)
Parameters
*
: indicates that the task
decorator only accepts keyword arguments.
retries
: total number of times to retry the task upon failure. Default is 0.
retry_delay_seconds
: number of seconds to wait in between task retries. Default is 0.
targets
: list of decorator calls. Default is an empty list.
Example: