File tree Expand file tree Collapse file tree 1 file changed +2
-3
lines changed
src/servicex_did_finder_lib Expand file tree Collapse file tree 1 file changed +2
-3
lines changed Original file line number Diff line number Diff line change 32
32
33
33
34
34
MAX_RETRIES = 3
35
- CH_LEN = 30
36
35
37
36
38
37
class ServiceXAdapter :
@@ -92,10 +91,10 @@ def put_file_add(self, file_info):
92
91
self .logger .error (f'After { attempts } tries, failed to send ServiceX App a put_file '
93
92
f'message: { str (file_info )} - Ignoring error.' )
94
93
95
- def put_file_add_bulk (self , file_list ):
94
+ def put_file_add_bulk (self , file_list , chunk_length = 30 ):
96
95
# we first chunk up file_list as it can be very large in
97
96
# case there are a lot of replicas and a lot of files.
98
- chunks = [file_list [i :i + CH_LEN ] for i in range (0 , len (file_list ), CH_LEN )]
97
+ chunks = [file_list [i :i + chunk_length ] for i in range (0 , len (file_list ), chunk_length )]
99
98
for chunk in chunks :
100
99
success = False
101
100
attempts = 0
You can’t perform that action at this time.
0 commit comments