Skip to content

Unable to set retries or other arguments in non decorator task mode: #2954

Answered by joshmeek
JackDapid asked this question in Q&A
Discussion options

You must be logged in to vote

@JackDapid Try setting the task arguments at initialization like this:

class MyPrefectTask(Task):
    def __init__(self, df=None, **kwargs):
        ....

my_task = MyPrefectTask(max_retries=10, retry_delay=datetime.timedelta(seconds=5))

Replies: 2 comments 5 replies

Comment options

You must be logged in to vote
5 replies
@JackDapid
Comment options

@JackDapid
Comment options

@joshmeek
Comment options

@JackDapid
Comment options

@cicdw
Comment options

Answer selected by joshmeek
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants