Skip to content
Snippets Groups Projects
Commit 38c4d3ac authored by David Schmitz's avatar David Schmitz
Browse files

reworked task retry: only use for timeout errors

parent 701e7ec7
Branches
No related tags found
No related merge requests found
...@@ -124,10 +124,10 @@ def deactivate_route(routepk, **kwargs): ...@@ -124,10 +124,10 @@ def deactivate_route(routepk, **kwargs):
route.commit_deactivate() route.commit_deactivate()
return return
elif response=="Task timeout": else:
# removing rule in NETCONF failed, it is still ACTIVE and also collects statistics # removing rule in NETCONF failed, it is still ACTIVE and also collects statistics
# NETCONF "delete" operation failed, keep the object in DB # NETCONF "delete" operation failed, keep the object in DB
if deactivate_route.request.retries < settings.NETCONF_MAX_RETRY_BEFORE_ERROR: if response=="Task timeout" and deactivate_route.request.retries < settings.NETCONF_MAX_RETRY_BEFORE_ERROR:
# repeat the action # repeat the action
raise TimeoutError() raise TimeoutError()
else: else:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment