Hedgar03/04/2022, 6:59 PM
Kevin Kho03/04/2022, 7:31 PM
to fail the task. We don’t have retries on the flow level but we do have for task level if you want that
Hedgar03/05/2022, 2:03 PM
def extract_symbol(): Something here… @task(name=“extract index”) def extract_index(): Something here … @task(name=“combine”) def combine(sym indx ): coby = pd.merge(sym,inx) if coby[-1] == “MUKY”: coby else: raise ValueError(“there has been an incomplete data extract”) with Flow(): syb = extract_symbol() inx = extract_index() combine(syb, inx) what strategy can I use to ensure that the whole code run again during retry when it failed?
Kevin Kho03/05/2022, 2:09 PM
mutation in order to mark it as Failed
Hedgar03/05/2022, 7:35 PM
from prefect.engine import signals
according to the docs this would force a retry?
if coby[-1] != “MURKY”: raise signals.RETRY() else: coby
Kevin Kho03/05/2022, 8:55 PM
Hedgar03/06/2022, 8:13 AM