Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
synapse
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Monitor
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Maunium
synapse
Commits
85c59010
Commit
85c59010
authored
8 years ago
by
Erik Johnston
Browse files
Options
Downloads
Patches
Plain Diff
Comment
parent
ae7a132f
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
synapse/util/retryutils.py
+4
-0
4 additions, 0 deletions
synapse/util/retryutils.py
with
4 additions
and
0 deletions
synapse/util/retryutils.py
+
4
−
0
View file @
85c59010
...
@@ -125,6 +125,10 @@ class RetryDestinationLimiter(object):
...
@@ -125,6 +125,10 @@ class RetryDestinationLimiter(object):
def
__exit__
(
self
,
exc_type
,
exc_val
,
exc_tb
):
def
__exit__
(
self
,
exc_type
,
exc_val
,
exc_tb
):
valid_err_code
=
False
valid_err_code
=
False
if
exc_type
is
not
None
and
issubclass
(
exc_type
,
CodeMessageException
):
if
exc_type
is
not
None
and
issubclass
(
exc_type
,
CodeMessageException
):
# Some error codes are perfectly fine for some APIs, whereas other
# APIs may expect to never received e.g. a 404. It's important to
# handle 404 as some remote servers will return a 404 when the HS
# has been decommissioned.
if
exc_val
.
code
<
400
:
if
exc_val
.
code
<
400
:
valid_err_code
=
True
valid_err_code
=
True
elif
exc_val
.
code
==
404
and
self
.
backoff_on_404
:
elif
exc_val
.
code
==
404
and
self
.
backoff_on_404
:
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment