diff options
| author | Aleksandr Nogikh <nogikh@google.com> | 2022-08-26 08:52:40 +0000 |
|---|---|---|
| committer | Aleksandr Nogikh <wp32pw@gmail.com> | 2022-08-26 12:16:31 +0200 |
| commit | 70596d3428a1360f168e7b2b9001db32edeb05e5 (patch) | |
| tree | 42a51f5c4a1ae677bf811d3554e32d39760d148c /syz-ci | |
| parent | 46009ca197a7fcd4acba62b1b3f9d5b8623daa65 (diff) | |
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.
Diffstat (limited to 'syz-ci')
| -rw-r--r-- | syz-ci/syz-ci.go | 6 |
1 files 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): } |
