aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJason Gunthorpe <jgg@mellanox.com>2020-06-19 11:01:39 -0300
committerJason Gunthorpe <jgg@nvidia.com>2020-06-22 20:24:18 -0300
commitdfa6df1f50f9bb89ad27542712bfebdad9317b37 (patch)
treee629b2aec7e413ed8ec0dac7a52a2aedb81bcae3
parentcbdacc5965fc401f7401b977aef806230bf556ef (diff)
downloadcloud_mdir_sync-dfa6df1f50f9bb89ad27542712bfebdad9317b37.tar.gz
cloud_mdir_sync-dfa6df1f50f9bb89ad27542712bfebdad9317b37.tar.bz2
cloud_mdir_sync-dfa6df1f50f9bb89ad27542712bfebdad9317b37.zip
Gmail: Retry on 502 Bad Gateway
gmail occasionally returns this. Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
-rw-r--r--cloud_mdir_sync/gmail.py1
1 files changed, 1 insertions, 0 deletions
diff --git a/cloud_mdir_sync/gmail.py b/cloud_mdir_sync/gmail.py
index 121e3b6..d17e536 100644
--- a/cloud_mdir_sync/gmail.py
+++ b/cloud_mdir_sync/gmail.py
@@ -36,6 +36,7 @@ def _retry_protect(func):
e.code == 400 or # Bad Request
e.code == 509 or # Bandwidth Limit Exceeded
e.code == 429 or # Too Many Requests
+ e.code == 502 or # Bad Gateway
e.code == 504 or # Gateway Timeout
e.code == 200): # Success, but error JSON
self.cfg.logger.error(f"Gmail returns {e}, delaying")