Allow configurable timeout for chooser API calls to be more than 5 seconds
stevejalim opened this issue · comments
views.chooser_api_proxy
makes a requests.get()
call with a timeout
set to 5.
In real, deployed, sites on servers this is very likely plenty, but it would be good to have some control over this just in case -- in my situation I'm dealing with a heavily-loaded local development machine and the general system contention when running two local sites means the 5 second timeout isn't always enough. I've patched my local W-T install, but that's not a sensible long-term solution.
I'd be happy to PR a small fix, such as adding an optional setting:
WAGTAILTRANSFER_API_PROXY_TIMEOUT
, which defaults to 5
but can be overriden in settings.
But first, just wanted to get a view on what you all think.
Cheers
Steve