Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
ProActive
scheduling
Commits
3ad1e4a3
Unverified
Commit
3ad1e4a3
authored
Jun 21, 2020
by
Fabien Viale
Committed by
GitHub
Jun 21, 2020
Browse files
Merge pull request #3776 from fviale/master
Generic Info REMOVE_DELAY : change format
parents
dab65419
5af14e6b
Changes
2
Hide whitespace changes
Inline
Side-by-side
scheduler/scheduler-server/src/main/java/org/ow2/proactive/scheduler/core/SchedulingService.java
View file @
3ad1e4a3
...
...
@@ -575,7 +575,6 @@ public class SchedulingService {
boolean
shouldRemoveFromDb
=
PASchedulerProperties
.
JOB_REMOVE_FROM_DB
.
getValueAsBoolean
();
if
(
tempJobs
.
size
()
==
1
)
{
logger
.
info
(
"Job "
+
jobId
+
" will be removed at "
+
new
Date
(
at
));
infrastructure
.
getDBManager
().
scheduleJobForRemoval
(
tempJobs
.
get
(
0
).
getJobInfo
().
getJobId
(),
at
,
shouldRemoveFromDb
);
...
...
@@ -964,7 +963,7 @@ public class SchedulingService {
}
if
(
jobGenericInfo
!=
null
&&
jobGenericInfo
.
containsKey
(
GENERIC_INFO_REMOVE_DELAY
))
{
try
{
removeDelay
=
Tools
.
formatDate
(
jobGenericInfo
.
get
(
GENERIC_INFO_REMOVE_DELAY
));
removeDelay
=
Tools
.
parsePeriod
(
jobGenericInfo
.
get
(
GENERIC_INFO_REMOVE_DELAY
));
}
catch
(
Exception
e
)
{
logger
.
error
(
"Error when parsing generic information "
+
GENERIC_INFO_REMOVE_DELAY
+
" for job "
+
jobId
,
e
);
...
...
@@ -974,6 +973,7 @@ public class SchedulingService {
// auto remove
if
(
removeDelay
<
Long
.
MAX_VALUE
)
{
long
timeToRemove
=
System
.
currentTimeMillis
()
+
removeDelay
;
jlogger
.
info
(
jobId
,
"Job "
+
jobId
+
" will be removed at "
+
new
Date
(
timeToRemove
));
scheduleJobRemove
(
jobId
,
timeToRemove
);
}
}
catch
(
Throwable
t
)
{
...
...
@@ -1015,7 +1015,7 @@ public class SchedulingService {
if
(
job
.
getGenericInformation
()
!=
null
&&
job
.
getGenericInformation
().
containsKey
(
GENERIC_INFO_REMOVE_DELAY
))
{
try
{
toWait
=
Tools
.
formatDate
(
job
.
getGenericInformation
().
get
(
GENERIC_INFO_REMOVE_DELAY
));
toWait
=
Tools
.
parsePeriod
(
job
.
getGenericInformation
().
get
(
GENERIC_INFO_REMOVE_DELAY
));
}
catch
(
Exception
e
)
{
logger
.
error
(
"Error when parsing generic information "
+
GENERIC_INFO_REMOVE_DELAY
+
" for job "
+
job
.
getId
(),
e
);
...
...
scheduler/scheduler-server/src/test/resources/functionaltests/descriptors/Job_houseKeeping_With_GI.xml
View file @
3ad1e4a3
...
...
@@ -4,7 +4,7 @@
name=
"Job_houseKeeping_with_GI"
priority=
"normal"
>
<description>
Simple Job
</description>
<genericInformation>
<info
name=
"REMOVE_DELAY"
value=
"1
:00
"
/>
<info
name=
"REMOVE_DELAY"
value=
"1
m
"
/>
</genericInformation>
<taskFlow>
<task
name=
"task1"
>
...
...
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