Skip to content

Commit dda2992

Browse files
authored
1 parent 8185747 commit dda2992

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

readthedocs/projects/tasks/builds.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616

1717
import structlog
1818
from celery import Task
19+
from celery.exceptions import SoftTimeLimitExceeded
1920
from django.conf import settings
2021
from django.utils import timezone
2122
from slumber import API
@@ -484,6 +485,10 @@ def on_failure(self, exc, task_id, args, kwargs, einfo):
484485
if isinstance(exc, BuildCancelled):
485486
self.data.build["state"] = BUILD_STATE_CANCELLED
486487

488+
elif isinstance(exc, SoftTimeLimitExceeded):
489+
log.info("Soft time limit exceeded.")
490+
message_id = BuildUserError.BUILD_TIME_OUT
491+
487492
else:
488493
# We don't know what happened in the build. Log the exception and
489494
# report a generic notification to the user.

0 commit comments

Comments
 (0)