Ejemplo n.º 1
0
def import_files_from_another_instance(target, login, password, project=None):
    """
    Retrieve and save all the data related most recent events from another API
    instance. It doesn't change the IDs.
    """
    sync_service.init(target, login, password)
    sync_service.download_files_from_another_instance(project=project)
Ejemplo n.º 2
0
def import_data_from_another_instance(target, login, password, project=None):
    """
    Retrieve and save all the data from another API instance. It doesn't
    change the IDs.
    """
    sync_service.init(target, login, password)
    sync_service.run_main_data_sync(project=project)
    sync_service.run_project_data_sync(project=project)
    sync_service.run_other_sync(project=project)
Ejemplo n.º 3
0
def import_last_changes_from_another_instance(
    target, login, password, minutes=0, page_size=300
):
    """
    Retrieve and save all the data related to most recent events from another
    API instance. It doesn't change the IDs.
    """
    sync_service.init(target, login, password)
    print("Last events syncing started.")
    sync_service.run_last_events_sync(minutes=minutes, page_size=300)
    print("Last events syncing ended.")
Ejemplo n.º 4
0
def import_last_file_changes_from_another_instance(
    target, login, password, minutes=20, page_size=50, force=False
):
    """
    Retrieve and save all the data related most to recent file events
    from another API instance (new previews and thumbnails).
    It doesn't change the IDs.
    """
    sync_service.init(target, login, password)
    print("Last files syncing started.")
    sync_service.run_last_events_files(minutes=minutes, page_size=50)
    print("Last files syncing ended.")
Ejemplo n.º 5
0
def import_data_from_another_instance(target,
                                      login,
                                      password,
                                      project=None,
                                      with_events=False,
                                      no_projects=False,
                                      only_projects=False):
    """
    Retrieve and save all the data from another API instance. It doesn't
    change the IDs.
    """
    sync_service.init(target, login, password)
    if not only_projects:
        sync_service.run_main_data_sync(project=project)
    if not no_projects:
        sync_service.run_project_data_sync(project=project)
        sync_service.run_other_sync(project=project)