Open
Description
My golem_core
-based code usually has this:
from golem_core.mid import default_negotiate
async def negotiate(proposal):
return await asyncio.wait_for(default_negotiate(proposal), timeout=5)
(and the same for other default_*
functions).
--> It seems timeouts should be inside the golem-core
, somewhere. Note that we can't just add an argument to default_negotiate
, because it is intended to be called via Map
in a Chain
so we don't control the arguments that easily.
I see two options here:
A) Default timeouts in default_*
functions that are fixed (or maybe can be changed with things like golem_core.mid.DEFAULT_NEGOTIATE_TIMEOUT = 7
?)
B) Timeout argument to Map
I'm not sure which is better, maybe there's a third path?