self.previous_step = None
self.stopping = False
- self.build_succeeded = True
# recipe model and package model
self.recipe_model = recipe_model
fraction = 0
self.build_details_page.update_progress_bar("Build Started: ", fraction)
- def handler_build_succeeded_cb(self, running_build):
- self.build_succeeded = True
+ def build_succeeded(self):
if self.current_step == self.FAST_IMAGE_GENERATING:
fraction = 0.9
elif self.current_step == self.IMAGE_GENERATING:
elif self.current_step == self.PACKAGE_GENERATING:
fraction = 1.0
self.build_details_page.update_progress_bar("Build Completed: ", fraction)
+ self.stopping = False
- def handler_build_failed_cb(self, running_build):
- self.build_succeeded = False
+ def build_failed(self):
if self.current_step == self.FAST_IMAGE_GENERATING:
fraction = 0.9
elif self.current_step == self.IMAGE_GENERATING:
self.handler.build_failed_async()
self.stopping = False
+ def handler_build_succeeded_cb(self, running_build):
+ if not self.stopping:
+ self.build_succeeded()
+ else:
+ self.build_failed()
+
+
+ def handler_build_failed_cb(self, running_build):
+ self.build_failed()
+
def handler_task_started_cb(self, running_build, message):
fraction = message["current"] * 1.0/message["total"]
title = "Build packages"