diff options
author | Jason Gunthorpe <jgg@mellanox.com> | 2020-06-19 11:01:39 -0300 |
---|---|---|
committer | Jason Gunthorpe <jgg@nvidia.com> | 2020-06-22 20:24:18 -0300 |
commit | dfa6df1f50f9bb89ad27542712bfebdad9317b37 (patch) | |
tree | e629b2aec7e413ed8ec0dac7a52a2aedb81bcae3 | |
parent | cbdacc5965fc401f7401b977aef806230bf556ef (diff) | |
download | cloud_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.py | 1 |
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") |