Add optional timeout for ligo.lw.utils.load_url
If passing in a URL which would be parsed by urlopen
, this can potentially hang forever without being able to specify a timeout to it (https://git.ligo.org/kipp.cannon/python-ligo-lw/-/blob/master/ligo/lw/utils/init.py#L439).
This failure mode was seen in an online gstlal job (gstlal_inspiral_marginalize_likelihoods_online
) when pinging one of the bottle routes, where the server was taking in requests but never sending a response. Ultimately I tracked the polling code to the line linked above.