Hi all! Is there any way not to fail the entire fl...
# ask-community
m
Hi all! Is there any way not to fail the entire flow that consists only of 1
map
task and some
mapped
runs are failed? Thx in advance)
k
Hey @Max Kureykin, what would your criteria for Flow success/failure be?
m
I have some strange problem with task, which is not related to prefect. It happens 1-2 times over 5000 mapped runs. For me it is ok, but the flow would be marked as failed
k
If you just want it to always be successful, I would just add a task after the mapped task and have it do nothing.
Copy code
@task
def myreduce():
    pass

with Flow() as flow:
     map_task = A.mapped([1,2,3])
     reduce_task = myreduce(map_task)
And this reduce task should be successful
m
funny, got you) thanks😀
k
or you can use a Flow State Handler, and just return success