Skip to content

Commit ca6a82c

Browse files
authored
Task router: check new config build.tools.python for conda (#8855)
We were checking just `conda` key from the config file. This commit adds the check for `miniconda` in `build.tools.python` too.
1 parent e7102a4 commit ca6a82c

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

readthedocs/builds/tasks.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,14 @@ def route_for_task(self, task, args, kwargs, **__):
115115
last_builds = version.builds.order_by('-date')[:self.N_LAST_BUILDS]
116116
# Version has used conda in previous builds
117117
for build in last_builds.iterator():
118-
if build.config.get('conda', None):
118+
build_tools_python = build.config.get('build', {}).get('tools', {}).get('python', '')
119+
conda = build.config.get('conda', None)
120+
121+
uses_conda = any([
122+
conda,
123+
build_tools_python.startswith('miniconda'),
124+
])
125+
if uses_conda:
119126
log.info(
120127
'Routing task because project uses conda.',
121128
project_slug=project.slug,

0 commit comments

Comments
 (0)