We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
delete_closed_external_versions
1 parent 803db6b commit 7a44633Copy full SHA for 7a44633
readthedocs/builds/tasks.py
@@ -7,6 +7,7 @@
7
from django.urls import reverse
8
from django.utils import timezone
9
from django.utils.translation import gettext_lazy as _
10
+from oauthlib.oauth2.rfc6749.errors import InvalidGrantError, TokenExpiredError
11
12
from readthedocs import __version__
13
from readthedocs.api.v2.serializers import BuildCommandSerializer
@@ -265,6 +266,8 @@ def delete_closed_external_versions(limit=200, days=30 * 3):
265
266
commit=last_build.commit,
267
status=status,
268
)
269
+ except (TokenExpiredError, InvalidGrantError):
270
+ log.info("Failed to send status due to expired/invalid token.")
271
except Exception:
272
log.exception(
273
"Failed to send status",
0 commit comments