Acivico / WfExS-backend

Workflow Execution Service Backend
Apache License 2.0
1 stars 0 forks source link

Temporary contents are left #1

Closed jmfernandez closed 2 years ago

jmfernandez commented 2 years ago

In method starting at https://github.com/Acivico/WfExS-backend/blob/16bdcd01002cd2bbd7c10878576df4ca9fa54001/wfexs_backend/fetchers/s3.py#L13 the downloaded contents are saved to their own names, and later copied to the definitive ones. The problem is that the initial copy is also kept there.

Possible fixes are:

Acivico commented 2 years ago

Commit hash: 00eec8abd4b2ac7305672923ffbcfaf25bcf08a3

Solved issue: It has been changed so that instead of copying it moves

if os.path.isdir(local_path):
    shutil.move(local_path, cachedFilename)
    kind = ContentKind.Directory
elif os.path.isfile(local_path):
    shutil.move(local_path, cachedFilename)
    kind = ContentKind.File
else:
    raise WFException("Local path {} is neither a file nor a directory".format(local_path))
jmfernandez commented 2 years ago

Thanks!