Skip to content

Commit 4fded8c

Browse files
authored
Merge pull request #6875 from readthedocs/humitos/concurrency-filter-triggered
Filter triggered builds when checking concurrency
2 parents 1902ca7 + 5b91113 commit 4fded8c

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

readthedocs/api/v2/views/model_views.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
BRANCH,
1515
TAG,
1616
INTERNAL,
17+
BUILD_STATE_TRIGGERED,
1718
BUILD_STATE_FINISHED,
1819
)
1920
from readthedocs.builds.models import Build, BuildCommandResult, Version
@@ -291,7 +292,7 @@ def running(self, request, **kwargs):
291292
queryset = (
292293
self.get_queryset()
293294
.filter(project__slug=project_slug)
294-
.exclude(state__in=[BUILD_STATE_FINISHED])
295+
.exclude(state__in=[BUILD_STATE_TRIGGERED, BUILD_STATE_FINISHED])
295296
)
296297
return Response({'count': queryset.count()})
297298

0 commit comments

Comments
 (0)