1
0
Fork 0
mirror of https://github.com/portainer/portainer.git synced 2025-08-04 05:15:25 +02:00

fix(snapshot): update snapshot interval (#4789)

* fix(snapshot): update snapshot interval

* style(snapshot): add clarification about clearing signal
This commit is contained in:
Chaim Lev-Ari 2021-02-19 03:19:01 +02:00 committed by GitHub
parent 387bbeceba
commit 4a1a46c8c1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -4,7 +4,7 @@ import (
"log" "log"
"time" "time"
"github.com/portainer/portainer/api" portainer "github.com/portainer/portainer/api"
) )
// Service repesents a service to manage endpoint snapshots. // Service repesents a service to manage endpoint snapshots.
@ -48,7 +48,9 @@ func (service *Service) stop() {
return return
} }
// clear refreshSignal to mark the service as disabled
close(service.refreshSignal) close(service.refreshSignal)
service.refreshSignal = nil
} }
// SetSnapshotInterval sets the snapshot interval and resets the service // SetSnapshotInterval sets the snapshot interval and resets the service