Fix for incorrect watchdog disabling
This commit is contained in:
parent
2d20e58c91
commit
71f2cc11d2
|
@ -100,11 +100,11 @@ def send_http_request(picklable_request, retry_queue):
|
||||||
raise TypeError("picklable_request must be a PicklableHttpRequest. Was of type " + type(picklable_request).__name__)
|
raise TypeError("picklable_request must be a PicklableHttpRequest. Was of type " + type(picklable_request).__name__)
|
||||||
try:
|
try:
|
||||||
#t = threading.Timer(60, alert_hung_request)
|
#t = threading.Timer(60, alert_hung_request)
|
||||||
t.start()
|
#t.start()
|
||||||
bare_request = picklable_request.create_request()
|
bare_request = picklable_request.create_request()
|
||||||
s = requests.Session()
|
s = requests.Session()
|
||||||
prepared_request = s.prepare_request(bare_request)
|
prepared_request = s.prepare_request(bare_request)
|
||||||
#r = s.send(prepared_request, timeout=StatusReporter._HTTP_REQUEST_TIMEOUT)
|
r = s.send(prepared_request, timeout=StatusReporter._HTTP_REQUEST_TIMEOUT)
|
||||||
#t.cancel() # Watchdog no longer needed.
|
#t.cancel() # Watchdog no longer needed.
|
||||||
r.raise_for_status() # Raise an exception if there was an http error code returned
|
r.raise_for_status() # Raise an exception if there was an http error code returned
|
||||||
logging.info("HTTP request sent successfully.")
|
logging.info("HTTP request sent successfully.")
|
||||||
|
|
Loading…
Reference in New Issue