https://prefect.io logo
t

Tom Forbes

06/15/2021, 5:16 PM
When using
flow.run()
is it possible to override the result class/type? Doing:
Copy code
flow.run(result=LocalResult(...))
fails with:
Copy code
TypeError: run() got an unexpected keyword argument 'result'
k

Kevin Kho

06/15/2021, 5:23 PM
The FlowRunner.run() only takes in context, parameters, executor. I know you’re probably very aware of this by now but
if name == main
😅 would overwrite.
t

Tom Forbes

06/15/2021, 5:26 PM
I’m confused, this is what I’m trying to do:if
Copy code
if __name__ == "__main__":
    flow.run(result=local_storage())
or am I misunderstanding something?
k

Kevin Kho

06/15/2021, 5:27 PM
This will override
Copy code
if __name__ == "__main__":
    flow.result = local_storage()
    flow.run()
t

Tom Forbes

06/15/2021, 5:29 PM
Oh right! Thank you 🙏
2 Views