Merge pull request #2022 from charltonaustin/refactor_for_cancel_anytime

Making some refactors to make it easier to cancel the build at any time.
This commit is contained in:
Charlton Austin 2016-10-24 16:17:55 -04:00 committed by GitHub
commit dc35769396
3 changed files with 86 additions and 16 deletions

View file

@ -63,10 +63,7 @@ class StatusHandler(object):
self._append_log_message(phase, self._build_logs.PHASE, extra_data)
# Update the repository build with the new phase
repo_build = model.build.get_repository_build(self._uuid)
repo_build.phase = phase
repo_build.save()
return True
return model.build.update_phase(self._uuid, phase)
def __enter__(self):
return self._status