Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
C
caosdb-server
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
caosdb
Software
caosdb-server
Commits
7197d0b8
Verified
Commit
7197d0b8
authored
5 years ago
by
Timm Fitschen
Browse files
Options
Downloads
Patches
Plain Diff
Revert changes in Schedule.java
parent
15922b10
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/main/java/caosdb/server/jobs/Schedule.java
+5
-16
5 additions, 16 deletions
src/main/java/caosdb/server/jobs/Schedule.java
with
5 additions
and
16 deletions
src/main/java/caosdb/server/jobs/Schedule.java
+
5
−
16
View file @
7197d0b8
...
@@ -31,11 +31,9 @@ class ScheduledJob {
...
@@ -31,11 +31,9 @@ class ScheduledJob {
long
runtime
=
0
;
long
runtime
=
0
;
final
Job
job
;
final
Job
job
;
private
long
startTime
=
-
1
;
private
long
startTime
=
-
1
;
private
final
JobExecutionTime
executionTime
;
public
ScheduledJob
(
final
Job
j
)
{
public
ScheduledJob
(
final
Job
j
)
{
this
.
job
=
j
;
this
.
job
=
j
;
this
.
executionTime
=
j
.
getExecutionTime
();
}
}
public
void
run
()
{
public
void
run
()
{
...
@@ -73,17 +71,12 @@ class ScheduledJob {
...
@@ -73,17 +71,12 @@ class ScheduledJob {
}
}
public
JobExecutionTime
getExecutionTime
()
{
public
JobExecutionTime
getExecutionTime
()
{
return
this
.
e
xecutionTime
;
return
this
.
job
.
getE
xecutionTime
()
;
}
}
public
boolean
skip
()
{
public
boolean
skip
()
{
return
this
.
job
.
getTarget
().
skipJob
();
return
this
.
job
.
getTarget
().
skipJob
();
}
}
@Override
public
String
toString
()
{
return
"SCHEDULED_"
+
this
.
job
.
toString
();
}
}
}
public
class
Schedule
{
public
class
Schedule
{
...
@@ -105,14 +98,10 @@ public class Schedule {
...
@@ -105,14 +98,10 @@ public class Schedule {
public
void
runJobs
(
final
JobExecutionTime
time
)
{
public
void
runJobs
(
final
JobExecutionTime
time
)
{
for
(
final
ScheduledJob
scheduledJob
:
this
.
jobs
)
{
for
(
final
ScheduledJob
scheduledJob
:
this
.
jobs
)
{
try
{
if
(
scheduledJob
.
getExecutionTime
().
ordinal
()
==
time
.
ordinal
()
if
(
scheduledJob
.
getExecutionTime
().
ordinal
()
==
time
.
ordinal
()
||
(
time
.
ordinal
()
<=
JobExecutionTime
.
POST_CHECK
.
ordinal
()
||
(
time
.
ordinal
()
<=
JobExecutionTime
.
POST_CHECK
.
ordinal
()
&&
scheduledJob
.
getExecutionTime
().
ordinal
()
<
time
.
ordinal
()))
{
&&
scheduledJob
.
getExecutionTime
().
ordinal
()
<
time
.
ordinal
()))
{
runJob
(
scheduledJob
);
runJob
(
scheduledJob
);
}
}
catch
(
RuntimeException
e
)
{
throw
new
RuntimeException
(
scheduledJob
.
toString
(),
e
);
}
}
}
}
}
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment