Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
europdx
k8s
cbio-on-demand
API
Commits
0d622081
Commit
0d622081
authored
Jul 24, 2019
by
Ľuboslav Pivarč
Browse files
fixed extand -> extand from schedule not now
parent
c12b9474
Changes
1
Hide whitespace changes
Inline
Side-by-side
cbioondemandK8S/src/main/java/cz/muni/ics/edirex/cbioondemandK8S/service/KubernetesImpl.java
View file @
0d622081
...
...
@@ -23,6 +23,7 @@ import java.util.UUID;
@Service
public
class
KubernetesImpl
implements
CBioOnDemandService
{
public
static
final
int
MS_TO_SEC
=
1000
;
private
final
long
TIME_TO_LIVE
=
Utils
.
HOUR
*
4
;
private
KubernetesCalls
api
;
...
...
@@ -419,8 +420,12 @@ public class KubernetesImpl implements CBioOnDemandService {
if
(!
result
.
isEmpty
()){
V1beta1CronJob
job
=
result
.
get
(
0
);
long
expire
=
new
Date
().
getTime
()
+
instance
.
getSecondsToExpire
();
setSchedule
(
job
,
expire
);
long
expireInSec
=
Utils
.
getExpireTimeFromCronExpresion
(
job
.
getSpec
().
getSchedule
());
expireInSec
=
expireInSec
+
instance
.
getSecondsToExpire
();
long
newSchedule
=
new
Date
().
getTime
();
newSchedule
+=
expireInSec
*
MS_TO_SEC
;
setSchedule
(
job
,
newSchedule
);
if
(
api
.
updateCronJob
(
job
,
NAMESPACE
))
return
instance
;
}
...
...
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