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.
container_time_limit
1 parent 4c55898 commit 4d36ec9Copy full SHA for 4d36ec9
readthedocs/api/v2/models.py
@@ -19,8 +19,9 @@ def create_key(self, project):
19
Build API keys are valid for 3 hours,
20
and can be revoked at any time by hitting the /api/v2/revoke/ endpoint.
21
"""
22
- # Use the build time limit + 15% for the API token
23
- expiry_date = timezone.now() + timedelta(seconds=settings.BUILD_TIME_LIMIT * 1.25)
+ # Use the project or default build time limit + 15% for the API token
+ delta = (project.container_time_limit or settings.BUILD_TIME_LIMIT) * 1.25
24
+ expiry_date = timezone.now() + timedelta(seconds=delta)
25
name_max_length = self.model._meta.get_field("name").max_length
26
return super().create_key(
27
# Name is required, so we use the project slug for it.
0 commit comments