Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
Core
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
EIP
Labrador
AuTA
Core
Commits
7980213d
Unverified
Commit
7980213d
authored
Feb 15, 2020
by
Luc Everse
Browse files
Options
Downloads
Patches
Plain Diff
Unbox timeout integer
parent
5364c908
Branches
Branches containing commit
Tags
Tags containing commit
2 merge requests
!148
Release 2.3.0
,
!137
Worker timeout
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
worker/src/main/java/nl/tudelft/ewi/auta/worker/JobSplitter.java
+6
-6
6 additions, 6 deletions
...src/main/java/nl/tudelft/ewi/auta/worker/JobSplitter.java
with
6 additions
and
6 deletions
worker/src/main/java/nl/tudelft/ewi/auta/worker/JobSplitter.java
+
6
−
6
View file @
7980213d
...
...
@@ -155,7 +155,7 @@ public class JobSplitter {
logger
.
debug
(
"Loaded job configuration {}"
,
this
.
gson
.
toJson
(
config
));
final
Instant
endTime
;
if
(
timeout
.
equals
(
0
)
)
{
if
(
timeout
==
0
)
{
endTime
=
Instant
.
MAX
;
}
else
{
endTime
=
Instant
.
now
().
plusSeconds
(
timeout
);
...
...
@@ -240,19 +240,19 @@ public class JobSplitter {
}
/**
* Returns the job
ID
in the message.
* Returns the job
timeout
in the message.
*
* @param message the message to get the
ID
from
* @param message the message to get the
timeout
from
*
* @return the job's timeout
*
* @throws BadJobException if the message contains no
ID
* @throws BadJobException if the message contains no
timeout
*/
private
I
nt
eger
getJobTimeout
(
final
Message
message
)
{
private
i
nt
getJobTimeout
(
final
Message
message
)
{
@Nullable
final
var
timeout
=
message
.
getTimeout
();
if
(
timeout
==
null
)
{
throw
new
BadJobException
(
"Job has no
identifier
"
);
throw
new
BadJobException
(
"Job has no
timeout
"
);
}
return
timeout
;
...
...
...
...
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
sign in
to comment