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-flask
Commits
faa4b32b
Commit
faa4b32b
authored
Oct 12, 2021
by
Joao Pedro Lopes
Browse files
FTS-1731
: Migrate
FTS-1728
-
fts-rest@fe704b5a
parent
e8d20e4e
Pipeline
#3118403
passed with stages
in 10 minutes and 45 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
src/fts3rest/fts3rest/lib/JobBuilder.py
View file @
faa4b32b
...
...
@@ -337,6 +337,24 @@ class JobBuilder:
if
max_time_in_queue
is
not
None
:
expiration_time
=
time
.
time
()
+
max_time_in_queue
if
max_time_in_queue
is
not
None
and
self
.
params
[
"bring_online"
]
>
0
:
# Ensure that the bringonline and expiration delta is respected
timeout_delta
=
seconds_from_value
(
app
.
config
.
get
(
"fts3.BringOnlineAndExpirationDelta"
,
None
)
)
if
timeout_delta
is
not
None
:
log
.
debug
(
"Will enforce BringOnlineAndExpirationDelta="
+
str
(
timeout_delta
)
+
"s"
)
if
max_time_in_queue
-
self
.
params
[
"bring_online"
]
<
timeout_delta
:
raise
BadRequest
(
"Bringonline and Expiration timeout must be at least "
+
str
(
timeout_delta
)
+
" seconds apart"
)
if
self
.
params
[
"overwrite"
]:
overwrite_flag
=
"Y"
elif
self
.
params
[
"overwrite_on_retry"
]:
...
...
src/fts3rest/fts3rest/lib/JobBuilder_utils.py
View file @
faa4b32b
...
...
@@ -276,6 +276,8 @@ def seconds_from_value(value):
return
int
(
value
)
*
60
elif
suffix
==
"h"
:
return
int
(
value
)
*
3600
elif
suffix
==
"d"
:
return
int
(
value
)
*
3600
*
24
else
:
return
None
except
Exception
:
...
...
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