mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
fix: minor fix to plugin service shut down flow
This commit is contained in:
parent
7e2fb5e92e
commit
b3531362ca
@ -111,11 +111,14 @@ func (pm *PluginManager) Run(ctx context.Context) error {
|
||||
pm.checkForUpdates()
|
||||
|
||||
ticker := time.NewTicker(time.Minute * 10)
|
||||
for {
|
||||
run := true
|
||||
|
||||
for run {
|
||||
select {
|
||||
case <-ticker.C:
|
||||
pm.checkForUpdates()
|
||||
case <-ctx.Done():
|
||||
run = false
|
||||
break
|
||||
}
|
||||
}
|
||||
@ -125,7 +128,7 @@ func (pm *PluginManager) Run(ctx context.Context) error {
|
||||
p.Kill()
|
||||
}
|
||||
|
||||
return nil
|
||||
return ctx.Err()
|
||||
}
|
||||
|
||||
func checkPluginPaths() error {
|
||||
|
Loading…
Reference in New Issue
Block a user