fix(scheduler): remove jobs that won't be used anymore BE-11045 (#12058)

pull/12071/head
andres-portainer 2024-08-01 10:59:29 -03:00 committed by GitHub
parent 3b5ce1b053
commit 560a1a00ca
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 0 deletions

View File

@ -84,6 +84,7 @@ func (s *Scheduler) StopJob(jobID string) error {
s.mu.Lock()
if cancel, ok := s.activeJobs[entryID]; ok {
cancel()
delete(s.activeJobs, entryID)
}
s.mu.Unlock()