Simplify lock acquire
Currently we are acquiring 3 locks.
We should only have 2 (we can't have only one because of
@@ -560,6 +560,7 @@ class UpdateDocsTaskStep(SyncRepositoryMixin):
)
try:
+ with self.project.repo_nonblockinglock(version=self.version):
self.setup_python_environment()
# TODO the build object should have an idea of these states,
@@ -912,7 +913,6 @@ class UpdateDocsTaskStep(SyncRepositoryMixin):
"""
self.build_env.update_build(state=BUILD_STATE_INSTALLING)
- with self.project.repo_nonblockinglock(version=self.version):
# Check if the python version/build image in the current venv is the
# same to be used in this build and if it differs, wipe the venv to
# avoid conflicts.
@@ -941,7 +941,6 @@ class UpdateDocsTaskStep(SyncRepositoryMixin):
before_build.send(sender=self.version)
outcomes = defaultdict(lambda: False)
- with self.project.repo_nonblockinglock(version=self.version):
outcomes['html'] = self.build_docs_html()
outcomes['search'] = self.build_docs_search()
outcomes['localmedia'] = self.build_docs_localmedia()
