From 70596d3428a1360f168e7b2b9001db32edeb05e5 Mon Sep 17 00:00:00 2001 From: Aleksandr Nogikh Date: Fri, 26 Aug 2022 08:52:40 +0000 Subject: syz-ci: abort asset deprecation on syz-ci stop Currently it only reacts on Ctrl+C, so the loop prevents e.g. the restart of syz-ci after an update. --- syz-ci/syz-ci.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/syz-ci/syz-ci.go b/syz-ci/syz-ci.go index 2f29fec5e..54d9b877c 100644 --- a/syz-ci/syz-ci.go +++ b/syz-ci/syz-ci.go @@ -261,7 +261,7 @@ func main() { }) wg.Add(1) - go deprecateAssets(cfg, shutdownPending, &wg) + go deprecateAssets(cfg, stop, &wg) wg.Wait() select { @@ -271,7 +271,7 @@ func main() { } } -func deprecateAssets(cfg *Config, shutdownPending chan struct{}, wg *sync.WaitGroup) { +func deprecateAssets(cfg *Config, stop chan struct{}, wg *sync.WaitGroup) { defer wg.Done() if cfg.DashboardAddr == "" || cfg.AssetStorage.IsEmpty() || !cfg.AssetStorage.DoDeprecation { @@ -292,7 +292,7 @@ loop: for { const sleepDuration = 6 * time.Hour select { - case <-shutdownPending: + case <-stop: break loop case <-time.After(sleepDuration): } -- cgit mrf-deployment