fix(R-1298): held-app reports only for installed apps (a restore hold always)
Red-proved. Commit only.
This commit is contained in:
1 parent
dfd0f8ec53
commit
b156e4526a
4 files changed
+75
-3
No files matched your search
@@ -1068,6 +1068,12 @@ func main() {
|
||||
// when one is gone, every hold again once a day and after each start. One observer of the hold store, so every
|
||||
// writer is covered. Pinned by internal/holdreport.
|
||||
holdReporter := holdreport.New(sett, notifier.PushEvent, logger)
|
||||
// R-1298: „installed" = the app's app.yaml file exists (a product removal deletes it; an unreadable one still counts,
|
||||
// the R-1220 rule). An install's hold of an app without one is not reported.
|
||||
holdReporter.SetInstalled(func(stack string) bool {
|
||||
_, err := os.Stat(filepath.Join(cfg.Paths.StacksDir, stack, "app.yaml"))
|
||||
return err == nil
|
||||
})
|
||||
sched.Every("hold-report", time.Minute, func(ctx context.Context) error {
|
||||
holdReporter.Tick(time.Now())
|
||||
return nil
|
||||
|
||||
Reference in new issue
Block a user