Skip to content

Commit 20e6949

Browse files
authored
Log contain time and memory limits (#12319)
1 parent 9428f14 commit 20e6949

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

readthedocs/core/utils/__init__.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,10 @@ def prepare_build(
104104
options["soft_time_limit"] = time_limit
105105
options["time_limit"] = int(time_limit * 1.2)
106106

107+
structlog.contextvars.bind_contextvars(
108+
time_limit=options["time_limit"], soft_time_limit=options["soft_time_limit"]
109+
)
110+
107111
if commit:
108112
structlog.contextvars.bind_contextvars(commit=commit)
109113

readthedocs/doc_builder/environments.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -810,6 +810,8 @@ def create_container(self):
810810
"Creating Docker container.",
811811
container_image=self.container_image,
812812
container_id=self.container_id,
813+
time_limit=self.container_time_limit,
814+
mem_limit=self.container_mem_limit,
813815
)
814816
self.container = client.create_container(
815817
image=self.container_image,

0 commit comments

Comments
 (0)