Skip to content

Commit

Permalink
Merge pull request #78 from grycap/dev_micafer
Browse files Browse the repository at this point in the history
Fix error with already uploaded files
  • Loading branch information
micafer authored Feb 5, 2025
2 parents 92a33da + 31a764f commit 04b9d31
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions faassupervisor/storage/providers/rucio.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
from rucio.client.client import Client
from rucio.client.uploadclient import UploadClient
from rucio.client.downloadclient import DownloadClient
from rucio.common.exception import DataIdentifierAlreadyExists
from rucio.common.exception import DataIdentifierAlreadyExists, NoFilesUploaded
from faassupervisor.exceptions import RucioDataIdentifierAlreadyExists


Expand Down Expand Up @@ -105,7 +105,8 @@ def upload_file(self, file_path, file_name, output_path):
self.rucio_host)
try:
upload = self.upload_client.upload([file])
get_logger().debug('Uploaded file info: %s', upload)
except DataIdentifierAlreadyExists:
raise RucioDataIdentifierAlreadyExists(scope=self.scope, file_name=file_name)

get_logger().debug('Uploaded file info: %s', upload)
except NoFilesUploaded:
get_logger().info('File %s not uploaded. It already exists. Ignore.' % file_path)

0 comments on commit 04b9d31

Please sign in to comment.