def reset_pillow(request): pillow.reset_checkpoint() if PillowtopSupervisorApi().restart_pillow(pillow_name): return get_response() else: return get_response("Checkpoint reset but failed to restart pillow. " "Restart manually to complete reset.")
def stop_pillow(request): if PillowtopSupervisorApi().stop_pillow(pillow_name): return get_response() else: return get_response('Unknown error')