Esempio n. 1
0
def force_exit():
    global_status.stop()
    exit(-1)
Esempio n. 2
0
            previous_status = status

        if percent > -1 and not progress_completed[status]:
            print_progress(percent,
                           100,
                           get_status_name(status),
                           "Complete",
                           bar_length=50)
            progress_completed[status] = percent == 100

        sleep(1)
        time_passed += 1

        if not completed:
            completed = remote_session.get_completion_progress() == 100

            if time_passed % backup_time_seconds == 0:
                remote_session.save_session(
                    os.path.join(
                        options['backup_folder'], "backup_{}_{}.json".format(
                            dataset_name,
                            remote_session.get_completion_progress())))

    print(
        "Dataset is now hosted by the factory. Visit the factory public interface to access it."
    )
except Exception as ex:
    logging.info("Error: {}".format(ex))

global_status.stop()