Skip to content

Commit de4aabb

Browse files
committed
Simplify the container_ overrides
1 parent 722a612 commit de4aabb

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

readthedocs/doc_builder/environments.py

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -580,8 +580,6 @@ class DockerBuildEnvironment(BaseBuildEnvironment):
580580

581581
command_class = DockerBuildCommand
582582
container_image = DOCKER_IMAGE
583-
container_mem_limit = settings.BUILD_MEMORY_LIMIT
584-
container_time_limit = settings.BUILD_TIME_LIMIT
585583

586584
def __init__(self, *args, **kwargs):
587585
container_image = kwargs.pop("container_image", None)
@@ -608,10 +606,8 @@ def __init__(self, *args, **kwargs):
608606
if container_image:
609607
self.container_image = container_image
610608

611-
if self.project.container_mem_limit:
612-
self.container_mem_limit = self.project.container_mem_limit
613-
if self.project.container_time_limit:
614-
self.container_time_limit = self.project.container_time_limit
609+
self.container_mem_limit = self.project.container_mem_limit or settings.BUILD_MEMORY_LIMIT
610+
self.container_time_limit = self.project.container_time_limit or settings.BUILD_TIME_LIMIT
615611

616612
structlog.contextvars.bind_contextvars(
617613
project_slug=self.project.slug,

0 commit comments

Comments
 (0)