File tree Expand file tree Collapse file tree 1 file changed +9
-5
lines changed
src/DIRAC/TransformationSystem/Agent Expand file tree Collapse file tree 1 file changed +9
-5
lines changed Original file line number Diff line number Diff line change @@ -386,20 +386,24 @@ def cleanContent(self, directory):
386
386
387
387
# Executing with shifter proxy
388
388
gConfigurationData .setOptionInCFG ("/DIRAC/Security/UseServerCertificate" , "false" )
389
- res = DataManager ().removeFile (filesFound , force = True )
389
+ failed = {}
390
+ for chunkId , filesChunk in enumerate (breakListIntoChunks (filesFound , 500 )):
391
+ self .log .info ("Removing chunk" , chunkId )
392
+ res = DataManager ().removeFile (filesChunk , force = True )
393
+ if not res ["OK" ]:
394
+ failed .update (dict .fromkeys (filesChunk , res ["Message" ]))
395
+ failed .update (res ["Value" ]["Failed" ])
390
396
gConfigurationData .setOptionInCFG ("/DIRAC/Security/UseServerCertificate" , "true" )
391
397
392
- if not res ["OK" ]:
393
- return res
394
398
realFailure = False
395
- for lfn , reason in res [ "Value" ][ "Failed" ] .items ():
399
+ for lfn , reason in failed .items ():
396
400
if "File does not exist" in str (reason ):
397
401
self .log .warn (f"File { lfn } not found in some catalog: " )
398
402
else :
399
403
self .log .error ("Failed to remove file found in the catalog" , f"{ lfn } { reason } " )
400
404
realFailure = True
401
405
if realFailure :
402
- return S_ERROR ("Failed to remove all files found in the catalog" )
406
+ return S_ERROR ("Failed to remove some files found in the catalog" )
403
407
return S_OK ()
404
408
405
409
def __getCatalogDirectoryContents (self , directories ):
You can’t perform that action at this time.
0 commit comments