Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Job Queues
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Jira
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Container registry
Monitor
Service Desk
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
OSS
Libraries
Go
Services
Job Queues
Compare revisions
v1.15.11 to v1.15.12
Compare revisions
Changes are shown as if the
source
revision was being merged into the
target
revision.
Learn more about comparing revisions.
Source
oss/libraries/go/services/job-queues
Select target project
No results found
v1.15.12
Select Git revision
Branches
master
Tags
v1.0.0
v1.0.1
v1.1.0
v1.10.0
v1.10.1
v1.10.2
v1.11.0
v1.12.0
v1.12.1
v1.12.2
v1.12.3
v1.12.4
v1.12.5
v1.12.6
v1.12.7
v1.12.8
v1.13.0
v1.13.1
v1.13.2
v1.14.0
v1.15.0
v1.15.1
v1.15.10
v1.15.11
v1.15.12
v1.15.13
v1.15.14
v1.15.15
v1.15.16
v1.15.17
v1.15.2
v1.15.3
v1.15.4
v1.15.5
v1.15.6
v1.15.7
v1.15.8
v1.15.9
v1.16.0
v1.16.1
v1.17.0
v1.18.0
v1.18.1
v1.18.2
v1.19.0
v1.19.1
v1.19.2
v1.19.3
v1.19.4
v1.2.0
v1.20.0
v1.20.1
v1.20.2
v1.20.3
v1.21.0
v1.21.1
v1.22.0
v1.23.0
v1.23.1
v1.23.2
v1.3.0
v1.3.1
v1.3.2
v1.4.0
v1.5.0
v1.5.1
v1.6.0
v1.6.1
v1.7.0
v1.7.1
v1.7.2
v1.7.3
v1.8.0
v1.8.1
v1.9.0
76 results
Swap
Target
oss/libraries/go/services/job-queues
Select target project
oss/libraries/go/services/job-queues
1 result
v1.15.11
Select Git revision
Branches
master
Tags
v1.0.0
v1.0.1
v1.1.0
v1.10.0
v1.10.1
v1.10.2
v1.11.0
v1.12.0
v1.12.1
v1.12.2
v1.12.3
v1.12.4
v1.12.5
v1.12.6
v1.12.7
v1.12.8
v1.13.0
v1.13.1
v1.13.2
v1.14.0
v1.15.0
v1.15.1
v1.15.10
v1.15.11
v1.15.12
v1.15.13
v1.15.14
v1.15.15
v1.15.16
v1.15.17
v1.15.2
v1.15.3
v1.15.4
v1.15.5
v1.15.6
v1.15.7
v1.15.8
v1.15.9
v1.16.0
v1.16.1
v1.17.0
v1.18.0
v1.18.1
v1.18.2
v1.19.0
v1.19.1
v1.19.2
v1.19.3
v1.19.4
v1.2.0
v1.20.0
v1.20.1
v1.20.2
v1.20.3
v1.21.0
v1.21.1
v1.22.0
v1.23.0
v1.23.1
v1.23.2
v1.3.0
v1.3.1
v1.3.2
v1.4.0
v1.5.0
v1.5.1
v1.6.0
v1.6.1
v1.7.0
v1.7.1
v1.7.2
v1.7.3
v1.8.0
v1.8.1
v1.9.0
76 results
Show changes
Only incoming changes from source
Include changes to target since source was created
Compare
Commits on Source (1)
fix: save data
· 9e4f7dc3
Volker Schukai
authored
1 year ago
Verified
9e4f7dc3
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
database.go
+19
-5
19 additions, 5 deletions
database.go
with
19 additions
and
5 deletions
database.go
View file @
9e4f7dc3
...
...
@@ -104,9 +104,17 @@ func createOrUpdateJob(job GenericJob, db *gorm.DB) error {
}
}
else
{
tx
.
Unscoped
()
.
Model
(
&
existingJob
)
.
Where
(
"id = ?"
,
existingJob
.
ID
)
.
Select
(
"*"
)
.
Omit
(
"deleted_at"
,
"created_at"
,
"job_id"
)
.
Update
(
"deleted_at"
,
nil
)
// remove deleted from
r
:=
tx
.
Unscoped
()
.
Model
(
&
existingJob
)
.
Where
(
"id = ?"
,
existingJob
.
ID
)
.
Select
(
"*"
)
.
Omit
(
"deleted_at"
,
"created_at"
,
"job_id"
)
.
Update
(
"deleted_at"
,
nil
)
if
r
.
Error
!=
nil
{
Trace
(
"Error while deleting job"
,
"error"
,
r
.
Error
)
return
r
.
Error
}
tx
.
Model
(
&
existingJob
)
.
Where
(
"id = ?"
,
existingJob
.
ID
)
.
Select
(
"*"
)
.
Omit
(
"deleted_at"
,
"created_at"
,
"job_id"
)
.
UpdateColumns
(
SchedulerPersistence
{
// update scheduler
resultStats
:=
tx
.
Model
(
&
existingJob
)
.
Where
(
"id = ?"
,
existingJob
.
ID
)
.
Select
(
"*"
)
.
Omit
(
"deleted_at"
,
"created_at"
,
"job_id"
)
.
UpdateColumns
(
SchedulerPersistence
{
Type
:
""
,
Interval
:
0
,
Spec
:
""
,
...
...
@@ -116,9 +124,15 @@ func createOrUpdateJob(job GenericJob, db *gorm.DB) error {
Executed
:
false
,
})
err
:=
tx
.
Model
(
&
existingJob
)
.
Updates
(
permJob
)
.
Error
if
err
!=
nil
{
return
err
if
resultStats
.
Error
!=
nil
{
Trace
(
"Error while updating job stats"
,
"error"
,
resultStats
.
Error
)
return
resultStats
.
Error
}
r2
:=
tx
.
Model
(
&
existingJob
)
.
Where
(
"id = ?"
,
existingJob
.
ID
)
.
Select
(
"*"
)
.
Omit
(
"deleted_at"
,
"created_at"
,
"job_id"
)
.
Updates
(
permJob
)
if
r2
.
Error
!=
nil
{
return
r2
.
Error
}
}
...
...
This diff is collapsed.
Click to expand it.