def main():
    dry_run = False
    status = True
    latest = True
    if '--dry' in sys.argv:
        dry_run = True
    if '--no_status' in sys.argv:
        status = False
    if '--no_latest' in sys.argv:
        latest = False
    if not dry_run:
        script_utils.add_file_logger(logger, __file__)
    init_app(set_backends=True, routes=False)
    with TokuTransaction():
        if status:
            migrate_status(get_no_status_targets())
        if latest:
            migrate_latest(get_no_latest_targets())
        if dry_run:
            raise Exception('Dry Run -- Aborting Transaction')
dataset/ETHPy150Open CenterForOpenScience/osf.io/scripts/migrate_spam.py/main/original