Skip to content
Snippets Groups Projects
Verified Commit c465da9f authored by Volker Schukai's avatar Volker Schukai :alien:
Browse files

fix: deletejob have not to check active jobs #66

parent 752d3af5
No related branches found
No related tags found
No related merge requests found
......@@ -51,7 +51,7 @@ require (
go.uber.org/multierr v1.11.0 // indirect
golang.org/x/mod v0.8.0 // indirect
golang.org/x/net v0.21.0 // indirect
golang.org/x/sys v0.19.0 // indirect
golang.org/x/sys v0.20.0 // indirect
golang.org/x/time v0.3.0 // indirect
golang.org/x/tools v0.6.0 // indirect
)
......@@ -136,6 +136,7 @@ func (m *Manager) GetActiveJobs() map[JobID]GenericJob {
}
// DeleteJob removes a job from the active jobs and the database
// If you want to remove a job from the active jobs, use RemoveJob instead
func (m *Manager) DeleteJob(id JobID) error {
if m == nil {
......@@ -148,13 +149,8 @@ func (m *Manager) DeleteJob(id JobID) error {
var job GenericJob
var ok bool
if job, ok = m.activeJobs[id]; !ok {
return ErrJobNotActive
}
err := m.removeJobInternal(id)
if err != nil {
return err
if job, ok = m.activeJobs[id]; ok {
_ = m.removeJobInternal(id)
}
if m.jobSyncer != nil {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment