mergin/client_pull.py
def download_project_finalize(job):
    """
    To be called when download in the background is finished and we need to do the finalization (merge chunks etc.)

    This should not be called from a worker thread (e.g. directly from a handler when download is complete).

    If any of the workers has thrown any exception, it will be re-raised (e.g. some network errors).
    That also means that the whole job has been aborted.
    """

    job.executor.shutdown(wait=True)

    # make sure any exceptions from threads are not lost
    for future in job.futures:
        if future.exception() is not None:
            _cleanup_failed_download(job.directory, job.mp)
            raise future.exception()

    job.mp.log.info("--- download finished")

    for task in job.update_tasks:

        # right now only copy tasks...
        task.apply(job.directory, job.mp)

    # final update of project metadata
    # TODO: why not exact copy of project info JSON ?
    job.mp.metadata = {
        "name": job.project_path,
        "version": job.version,
        "files": job.project_info["files"]
    }

    To be called when download in the background is finished and we need to do the finalization (merge chunks etc.)

    This should not be called from a worker thread (e.g. directly from a handler when download is complete).

    If any of the workers has thrown any exception, it will be re-raised (e.g. some network errors).
    That also means that the whole job has been aborted.
    
To be called when download in the background is finished and we need to do the finalization (merge chunks etc.)
This should not be called from a worker thread .

If any of the workers has thrown any exception, it will be re-raised .
That also means that the whole job has been aborted.
To be called when download in the background is finished and we need to do the finalization ( merge chunks etc . ) This should not be called from a worker thread . If any of the workers has thrown any exception it will be re - raised . That also means that the whole job has been aborted .
def download_project_finalize(job):
    job.executor.shutdown(wait=True)
    for future in job.futures:
        if future.exception() is not None:
            _cleanup_failed_download(job.directory, job.mp)
            raise future.exception()
    job.mp.log.info("--- download finished")
    for task in job.update_tasks:
        task.apply(job.directory, job.mp)
    job.mp.metadata = {
        "name": job.project_path,
        "version": job.version,
        "files": job.project_info["files"]
    }
def download_project_finalize ( job ) : job . executor . shutdown ( wait = True ) for future in job . futures : if future . exception ( ) is not None : _cleanup_failed_download ( job . directory , job . mp ) raise future . exception ( ) job . mp . log . info ( "--- download finished" ) for task in job . update_tasks : task . apply ( job . directory , job . mp ) job . mp . metadata = { "name" : job . project_path , "version" : job . version , "files" : job . project_info [ "files" ] }
To be called when download in the background is finished and we need to do the finalization (merge chunks etc.)
To be called when download in the background is finished and we need to do the finalization ( merge chunks etc . )
"""
    To be called when download in the background is finished and we need to do the finalization (merge chunks etc.)

    This should not be called from a worker thread (e.g. directly from a handler when download is complete).

    If any of the workers has thrown any exception, it will be re-raised (e.g. some network errors).
    That also means that the whole job has been aborted.
    """ # make sure any exceptions from threads are not lost # right now only copy tasks... # final update of project metadata # TODO: why not exact copy of project info JSON ?
job