Add timeout to notification
There are some timeouts that blocks the data acquisition because it is waiting for 3s. Reading the requests documentation (https://requests.readthedocs.io/en/master/user/quickstart/#timeouts):
You can tell Requests to stop waiting for a response after a given number of seconds with the timeout parameter. Nearly all production code should use this parameter in nearly all requests.
I used timeouts before but I don't remember why I remove it but it is probably because I wanted to now if the response was 200. https://gitlab.esrf.fr/icat/tango-metadata/-/blob/master/src/metadata_manager/MetadataManager.py#L648
url = self.icatplus_server + "/logbook/" + str(self.API_KEY) + "/investigation/name/" + str(self.get_proposal()) + "/instrument/name/" + str(self.beamlineID.lower()) + "/event"
self.logger.debug(url)
requests.post(url,
data=(json.dumps(params)),
headers=headers)
#timeout=0.1
Note that upload base64 already uses the timeout:
requests.post(url,
data=(json.dumps(params)),
headers=headers,
timeout=0.1)