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(
49
49
from readthedocs .api .v2 .models import BuildAPIKey
50
50
from readthedocs .builds .models import Build
51
51
from readthedocs .builds .tasks import send_build_notifications
52
+ from readthedocs .projects .models import Feature
52
53
from readthedocs .projects .models import Project
53
54
from readthedocs .projects .models import WebHookEvent
54
55
from readthedocs .projects .tasks .builds import update_docs_task
@@ -171,6 +172,14 @@ def prepare_build(
171
172
172
173
_ , build_api_key = BuildAPIKey .objects .create_key (project = project )
173
174
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
+
174
183
return (
175
184
update_docs_task .signature (
176
185
args = (
Original file line number Diff line number Diff line change @@ -1977,6 +1977,7 @@ def add_features(sender, **kwargs):
1977
1977
SCALE_IN_PROTECTION = "scale_in_prtection"
1978
1978
USE_S3_SCOPED_CREDENTIALS_ON_BUILDERS = "use_s3_scoped_credentials_on_builders"
1979
1979
BUILD_HEALTHCHECK = "build_healthcheck"
1980
+ BUILD_NO_ACKS_LATE = "build_no_acks_late"
1980
1981
1981
1982
FEATURES = (
1982
1983
(
@@ -2055,6 +2056,10 @@ def add_features(sender, **kwargs):
2055
2056
BUILD_HEALTHCHECK ,
2056
2057
_ ("Build: Use background cURL healthcheck." ),
2057
2058
),
2059
+ (
2060
+ BUILD_NO_ACKS_LATE ,
2061
+ _ ("Build: Do not use Celery ASK_LATE config for this project." ),
2062
+ ),
2058
2063
)
2059
2064
2060
2065
FEATURES = sorted (FEATURES , key = lambda x : x [1 ])
You can’t perform that action at this time.
0 commit comments