Hello, is there a way to 'pause' a task depending ...
# prefect-community
m
Hello, is there a way to 'pause' a task depending on the outcome of some runtime process? I don't want the task to retry except in this one specific runtime result (normally the task could just fail and retry according to args) Perhaps I could return a manual state
AwaitingRetry
?
Copy code
@task
    # some code, oh found out a blocker I'd like to wait for
     time_2_hours_from_now=  .... some date function...
     if function_is_blocked:
           return AwaitingRetry(scheduled_time=time_2_hours_from_now
j
This would be a cool feature!
m
Hey @merlin This is definitely something we're intending to support in the future, in it's current state you could probably implement some conditional logic to bypass the task depending on the outcome of that process, howyou'd do this depends a bit on your use case but it should be doable.