File tree Expand file tree Collapse file tree 1 file changed +2
-8
lines changed
readthedocs/projects/tasks Expand file tree Collapse file tree 1 file changed +2
-8
lines changed Original file line number Diff line number Diff line change @@ -162,19 +162,13 @@ def finish_inactive_builds():
162
162
163
163
A build is consider inactive if it's not in a final state and it has been
164
164
"running" for more time that the allowed one (``Project.container_time_limit``
165
- or ``DOCKER_LIMITS['time'] `` plus a 20% of it).
165
+ or ``BUILD_TIME_LIMIT `` plus a 20% of it).
166
166
167
167
These inactive builds will be marked as ``success`` and ``CANCELLED`` with an
168
168
``error`` to be communicated to the user.
169
169
"""
170
170
# TODO: delete this task once we are fully migrated to ``BUILD_HEALTHCHECK``
171
- #
172
- # TODO similar to the celery task time limit, we can't infer this from
173
- # Docker settings anymore, because Docker settings are determined on the
174
- # build servers dynamically.
175
- # time_limit = int(DOCKER_LIMITS['time'] * 1.2)
176
- # Set time as maximum celery task time limit + 5m
177
- time_limit = 7200 + 300
171
+ time_limit = settings .BUILD_TIME_LIMIT * 1.2
178
172
delta = datetime .timedelta (seconds = time_limit )
179
173
query = (
180
174
~ Q (state__in = BUILD_FINAL_STATES )
You can’t perform that action at this time.
0 commit comments