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
354bb8ff
Commit
354bb8ff
authored
Mar 21, 2018
by
Maria Arsuaga Rios
Browse files
Update JobBuilder.py
parent
990d5c15
Pipeline
#337481
failed with stage
in 16 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
src/fts3rest/fts3rest/lib/JobBuilder.py
View file @
354bb8ff
...
...
@@ -405,7 +405,7 @@ class JobBuilder(object):
job_type
=
'Y'
else
:
job_type
=
'N'
log
.
debug
(
"job type is "
+
job_type
)
self
.
is_bringonline
=
self
.
params
[
'copy_pin_lifetime'
]
>
0
or
self
.
params
[
'bring_online'
]
>
0
job_initial_state
=
'STAGING'
if
self
.
is_bringonline
else
'SUBMITTED'
...
...
@@ -506,12 +506,12 @@ class JobBuilder(object):
self
.
job
[
'job_type'
]
=
'N'
auto_session_reuse
=
pylons
.
config
.
get
(
'fts3.AutoSessionReuse'
,
'false'
)
log
.
debug
(
"AutoSessionReuse is "
+
auto_session_reuse
+
" job_type is"
+
str
(
self
.
job
[
'
job_type
'
]
))
log
.
debug
(
"AutoSessionReuse is "
+
auto_session_reuse
+
" job_type is"
+
str
(
job_type
))
max_reuse_files
=
pylons
.
config
.
get
(
'fts3.AutoSessionReuseMaxFiles'
,
1000
)
max_size_small_file
=
pylons
.
config
.
get
(
'fts3.AutoSessionReuseMaxSmallFileSize'
,
104857600
)
#100MB
max_size_big_file
=
pylons
.
config
.
get
(
'fts3.AutoSessionReuseMaxBigFileSize'
,
1073741824
)
#1GB
max_big_files
=
pylons
.
config
.
get
(
'fts3.AutoSessionReuseMaxBigFiles'
,
2
)
if
(
auto_session_reuse
==
'true'
and
self
.
job
[
'source_se'
]
and
self
.
job
[
'dest_se'
]
and
(
self
.
job
[
'
job_type
'
]
is
None
)
and
(
len
(
self
.
files
)
>
1
))
:
if
(
auto_session_reuse
==
'true'
and
self
.
job
[
'source_se'
]
and
self
.
job
[
'dest_se'
]
and
(
job_type
is
None
)
and
(
len
(
self
.
files
)
>
1
))
:
if
len
(
self
.
files
)
>
max_reuse_files
:
self
.
job
[
'job_type'
]
==
'N'
log
.
debug
(
"The number of files "
+
str
(
len
(
self
.
files
))
+
"is bigger than the auto maximum reuse files "
+
str
(
max_reuse_files
))
...
...
Write
Preview
Supports
Markdown
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