projects
/
pgarchives.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
afc63a3
)
Set a timeout for sendinv Varnish purge requests
author
Magnus Hagander
<magnus@hagander.net>
Mon, 30 Mar 2020 19:51:25 +0000
(21:51 +0200)
committer
Magnus Hagander
<magnus@hagander.net>
Mon, 30 Mar 2020 19:51:25 +0000
(21:51 +0200)
Timeout error is better than hanging forever. Set a timeout for 30
seconds which is with a big margin longer than should ever be needed.
loader/lib/varnish.py
patch
|
blob
|
blame
|
history
diff --git
a/loader/lib/varnish.py
b/loader/lib/varnish.py
index 8a4812b36acb8e5719239638a97d14412eca8ec8..1004f4d5ca3d86b4ba72bd782db4c3acdcfa89d1 100644
(file)
--- a/
loader/lib/varnish.py
+++ b/
loader/lib/varnish.py
@@
-28,6
+28,6
@@
class VarnishPurger(object):
r = requests.post(purgeurl, data=purgedict, headers={
'Content-type': 'application/x-www-form-urlencoded',
'Host': 'www.postgresql.org',
- })
+ }
, timeout=30
)
if r.status_code != 200:
log.error("Failed to send purge request!")