Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
V
vospace-rest
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Redmine
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository 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
VOSpace INAF
vospace-rest
Commits
adcba2fb
Commit
adcba2fb
authored
3 years ago
by
Sonia Zorba
Browse files
Options
Downloads
Patches
Plain Diff
Updated job start_time and end_time in JobDAO instead of relying on job_insert trigger
parent
137a929a
No related branches found
No related tags found
No related merge requests found
Pipeline
#2323
passed
3 years ago
Stage: build
Stage: test
Stage: dockerize
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/main/java/it/inaf/oats/vospace/persistence/JobDAO.java
+18
-4
18 additions, 4 deletions
src/main/java/it/inaf/oats/vospace/persistence/JobDAO.java
with
18 additions
and
4 deletions
src/main/java/it/inaf/oats/vospace/persistence/JobDAO.java
+
18
−
4
View file @
adcba2fb
...
...
@@ -54,8 +54,22 @@ public class JobDAO {
String
sql
=
"INSERT INTO job(job_id, owner_id, job_type, phase, job_info, transfer_details, "
+
" results, error_message, error_type, error_has_detail, error_detail) "
+
"VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)"
;
+
" results, error_message, error_type, error_has_detail, error_detail, start_time, end_time) "
+
"VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, "
;
switch
(
jobSummary
.
getPhase
())
{
case
EXECUTING:
sql
+=
"NOW(), NULL)"
;
break
;
case
ERROR:
case
COMPLETED:
case
ABORTED:
sql
+=
"NOW(), NOW())"
;
break
;
default
:
sql
+=
"NULL, NULL)"
;
break
;
}
jdbcTemplate
.
update
(
sql
,
ps
->
{
int
i
=
0
;
...
...
@@ -200,7 +214,7 @@ public class JobDAO {
}
sb
.
append
(
")"
);
}
// Fill conditions on views list
if
(!
viewList
.
isEmpty
())
{
sb
.
append
(
" AND ("
)
...
...
@@ -310,7 +324,7 @@ public class JobDAO {
ps
.
setString
(++
i
,
job
.
getJobId
());
});
}
public
Transfer
getTransferDetails
(
String
jobId
)
{
String
sql
=
"SELECT transfer_details FROM job WHERE job_id = ?"
;
...
...
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