Skip to content

Commit 0fa8241

Browse files
committed
Update build from database at __exit__
When an exception happens and it's handled by __exit__ our Build in the database is not updated and it stay in 'Installing' forever. So, when something bad happens we force a call to `update_build` with the FINISHED state Attempt to fix #3285
1 parent 02cc08f commit 0fa8241

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,3 +43,4 @@ private_*
4343
readthedocs/htmlcov
4444
tags
4545
.python-version
46+
*.pyo

readthedocs/doc_builder/environments.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -556,6 +556,7 @@ def __exit__(self, exc_type, exc_value, tb):
556556
exc_info=True)
557557
self.container = None
558558
self.build['state'] = BUILD_STATE_FINISHED
559+
self.update_build(BUILD_STATE_FINISHED)
559560
log.info(LOG_TEMPLATE
560561
.format(project=self.project.slug,
561562
version=self.version.slug,

0 commit comments

Comments
 (0)