def start(self, app_ctx: ApplicationContext): def started_callback(ctx): self.start_callback_called = True def finished_callback(ctx): self.finish_callback_called = True app_ctx.add_callback(ContextEventType.started, started_callback) app_ctx.add_callback(ContextEventType.finished, finished_callback) app_ctx.shutter.shutdown()
def start(app_ctx: ApplicationContext): app_ctx.add_callback(ContextEventType.finished, finish) raise Exception('bad component')