'Return a co-routine that updates the stack.'

@scheduler.wrappertask
def __call__(self):

    cleanup_prev = scheduler.DependencyTaskGroup(self.previous_stack.dependencies, self._remove_backup_resource, reverse=True)
    def get_error_wait_time(resource):
        return resource.cancel_grace_period()
    updater = scheduler.DependencyTaskGroup(self.dependencies(), self._resource_update, error_wait_time=get_error_wait_time)
    if (not self.rollback):
        (yield cleanup_prev())
    try:
        (yield updater())
    finally:
        self.previous_stack.reset_dependencies()
