From ad439c6bfcf596d4bed20b04f5a02b30632e0ddd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20P=C3=A9ters?= Date: Wed, 4 Nov 2015 15:37:57 +0100 Subject: [PATCH] wscall: increase transmission timeout according to post size (#8865) --- wcs/wf/wscall.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/wcs/wf/wscall.py b/wcs/wf/wscall.py index 57ef753..047b77e 100644 --- a/wcs/wf/wscall.py +++ b/wcs/wf/wscall.py @@ -158,10 +158,12 @@ class WebserviceCallStatusItem(WorkflowStatusItem): try: if post_data is not None: + timeout = TIMEOUT post_data = json.dumps(post_data, cls=JSONEncoder, encoding=get_publisher().site_charset) + timeout += len(post_data) / 100000 # increase timeout for huge loads response, status, data, authheader = http_post_request( - url, post_data, headers=headers, timeout=TIMEOUT) + url, post_data, headers=headers, timeout=timeout) else: response, status, data, auth_header = http_get_page( url, headers=headers, timeout=TIMEOUT) -- 2.6.2