File tree Expand file tree Collapse file tree 2 files changed +14
-0
lines changed Expand file tree Collapse file tree 2 files changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -49,6 +49,7 @@ def prepare_build(
4949 from readthedocs .api .v2 .models import BuildAPIKey
5050 from readthedocs .builds .models import Build
5151 from readthedocs .builds .tasks import send_build_notifications
52+ from readthedocs .projects .models import Feature
5253 from readthedocs .projects .models import Project
5354 from readthedocs .projects .models import WebHookEvent
5455 from readthedocs .projects .tasks .builds import update_docs_task
@@ -171,6 +172,14 @@ def prepare_build(
171172
172173 _ , build_api_key = BuildAPIKey .objects .create_key (project = project )
173174
175+ # Disable ``ACKS_LATE`` for this particular build task to try out running builders longer than 1h.
176+ # At 1h exactly, the task is grabbed by another worker and re-executed,
177+ # even while it's still running on the original worker.
178+ # https://github.com/readthedocs/readthedocs.org/issues/12317
179+ if project .has_feature (Feature .BUILD_NO_ACKS_LATE ):
180+ log .info ("Disabling ACKS_LATE for this particular build." )
181+ options ["acks_late" ] = False
182+
174183 return (
175184 update_docs_task .signature (
176185 args = (
Original file line number Diff line number Diff line change @@ -1977,6 +1977,7 @@ def add_features(sender, **kwargs):
19771977 SCALE_IN_PROTECTION = "scale_in_prtection"
19781978 USE_S3_SCOPED_CREDENTIALS_ON_BUILDERS = "use_s3_scoped_credentials_on_builders"
19791979 BUILD_HEALTHCHECK = "build_healthcheck"
1980+ BUILD_NO_ACKS_LATE = "build_no_acks_late"
19801981
19811982 FEATURES = (
19821983 (
@@ -2055,6 +2056,10 @@ def add_features(sender, **kwargs):
20552056 BUILD_HEALTHCHECK ,
20562057 _ ("Build: Use background cURL healthcheck." ),
20572058 ),
2059+ (
2060+ BUILD_NO_ACKS_LATE ,
2061+ _ ("Build: Do not use Celery ASK_LATE config for this project." ),
2062+ ),
20582063 )
20592064
20602065 FEATURES = sorted (FEATURES , key = lambda x : x [1 ])
You can’t perform that action at this time.
0 commit comments