Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
File Transfer Service
fts-rest
Commits
0c5c6433
Commit
0c5c6433
authored
Nov 09, 2016
by
Maria Arsuaga Rios
Browse files
FTS-705
: reuse jobs with small files
parent
99b53d57
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/fts3rest/fts3rest/lib/JobBuilder.py
View file @
0c5c6433
...
...
@@ -456,6 +456,7 @@ class JobBuilder(object):
for
file_dict
in
files_list
:
self
.
_populate_files
(
file_dict
,
f_index
,
shared_hashed_id
)
f_index
+=
1
if
len
(
self
.
files
)
==
0
:
raise
HTTPBadRequest
(
'No valid pairs available'
)
...
...
@@ -484,7 +485,15 @@ class JobBuilder(object):
self
.
_apply_selection_strategy
()
self
.
_set_job_source_and_destination
(
self
.
files
)
if
(
self
.
job
[
'source_se'
]
and
self
.
job
[
'dest_se'
])
:
small_files
=
0
for
file
in
self
.
files
:
if
(
self
.
files
[
f_index
][
'user_filesize'
])
<
104857600
:
small_files
+=
1
if
small_files
>=
len
(
self
.
files
)
-
2
:
reuse_flag
=
'Y'
log
.
info
(
"Reuse jobs with "
+
small_files
+
" small files up to "
+
len
(
self
.
files
)
+
" total files"
)
# If reuse is enabled, source and destination SE must be the same
# for all entries
if
reuse_flag
==
'Y'
and
(
not
self
.
job
[
'source_se'
]
or
not
self
.
job
[
'dest_se'
]):
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment