https://prefect.io logo
Title
s

Sylvain Hazard

05/31/2022, 1:26 PM
Hey there ! I have a mapped task for uploading files through an API call and I'd like to avoid having to authenticate to the API for every task but my client is not JSON serializable and cannot be passed as a parameter. I'm pretty sure I've seen a way to properly deal with this before in the docs but can't seem to find it again. Any idea or advice ?
k

Kevin Kho

05/31/2022, 2:17 PM
As long as you don’t use DaskExecutor, you can return a client as long as the task
checkpoint=False
. You can then pass this to other tasks. Maybe you are thinking of a Resource Manager though
s

Sylvain Hazard

05/31/2022, 2:19 PM
Thanks, Resource Manager is what I was thinking of
Using a LocalDaskExecutor, I guess that won't work the wait I'd like it to 😕
k

Kevin Kho

05/31/2022, 2:29 PM
It will in threads but not processes
s

Sylvain Hazard

05/31/2022, 2:44 PM
Cool, thanks a lot !
k

Kevin Kho

05/31/2022, 2:48 PM
Actually it might work. I’m not 100% sure
s

Sylvain Hazard

05/31/2022, 2:49 PM
I'll try it out, it's not that much work anyways