summary refs log tree commit diff
path: root/synapse
diff options
context:
space:
mode:
authorErik Johnston <erikj@jki.re>2017-05-15 15:52:28 +0100
committerGitHub <noreply@github.com>2017-05-15 15:52:28 +0100
commit6d17573c23cd61d50922d62a8fb5c9086047a309 (patch)
tree0a68335ab5339b36759c956e73d2553a9ac1b6f3 /synapse
parentMerge pull request #2215 from hamber-dick/develop (diff)
parentDon't log exceptions for NotRetryingDestination (diff)
downloadsynapse-6d17573c23cd61d50922d62a8fb5c9086047a309.tar.xz
Merge pull request #2223 from matrix-org/erikj/ignore_not_retrying
Don't log exceptions for NotRetryingDestination
Diffstat (limited to 'synapse')
-rw-r--r--synapse/rest/media/v1/media_repository.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/synapse/rest/media/v1/media_repository.py b/synapse/rest/media/v1/media_repository.py
index c43b185e08..caca96c222 100644
--- a/synapse/rest/media/v1/media_repository.py
+++ b/synapse/rest/media/v1/media_repository.py
@@ -34,6 +34,7 @@ from synapse.api.errors import SynapseError, HttpResponseException, \
 from synapse.util.async import Linearizer
 from synapse.util.stringutils import is_ascii
 from synapse.util.logcontext import preserve_context_over_fn
+from synapse.util.retryutils import NotRetryingDestination
 
 import os
 import errno
@@ -181,7 +182,8 @@ class MediaRepository(object):
                     logger.exception("Failed to fetch remote media %s/%s",
                                      server_name, media_id)
                     raise
-
+                except NotRetryingDestination:
+                    logger.warn("Not retrying destination %r", server_name)
                 except Exception:
                     logger.exception("Failed to fetch remote media %s/%s",
                                      server_name, media_id)