. But the failure is “silent”, in that it’s wrapped by a lower-level library. I know how to check whether it’s failed, so how should I tell Prefect that the task failed (and retry?) — is it enough to
raise prefect.engine.signals.FAIL
? Or does it need to be an explicit
raise ValueError
or something?
z
Zanie
07/22/2021, 6:40 PM
Hey @Danny Vilela -- either raising a failure signal or throwing an exception should do it
🙌 1
d
Danny Vilela
07/22/2021, 6:40 PM
@Zanie awesome — thank you!
Danny Vilela
07/22/2021, 6:41 PM
Quick question: how does the
RETRY
signal fit here? Will it only
RETRY
if you’ve decorated the appropriate function task parameters? Or…retry indefinitely?
z
Zanie
07/22/2021, 6:42 PM
Ah I think if you raise the RETRY signal manually, you are overriding the retry logic attached to the task. I'm actually not sure what would happen if you mixed them both.
d
Danny Vilela
07/22/2021, 6:43 PM
Ah gotcha — no worries! I’ll stick with
FAIL
for now. Thanks again Michael 🙏
z
Zanie
07/22/2021, 6:43 PM
Generally, I'd try not to raise Prefect signals unless you have to
Zanie
07/22/2021, 6:43 PM
No problem 🙂
d
Danny Vilela
07/22/2021, 6:46 PM
Ahhhhh so sorry, whenever you’re free: Prefect prefers we raise an exception rather than raise the signal ourselves? Is there a particular reason?
k
Kevin Kho
07/22/2021, 6:56 PM
I think what Michael is saying that ideally the retry logic should be handled for you, rather than explicitly raising the signals. If there is an error, Prefect will handle those for you.
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.