Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(67)

Side by Side Diff: logdog/server/service/config/poller.go

Issue 2963503003: [errors] Greatly simplify common/errors package. (Closed)
Patch Set: fix nits Created 3 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « logdog/server/archivist/archivist.go ('k') | logdog/server/service/service.go » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The LUCI Authors. All rights reserved. 1 // Copyright 2016 The LUCI Authors. All rights reserved.
2 // Use of this source code is governed under the Apache License, Version 2.0 2 // Use of this source code is governed under the Apache License, Version 2.0
3 // that can be found in the LICENSE file. 3 // that can be found in the LICENSE file.
4 4
5 package config 5 package config
6 6
7 import ( 7 import (
8 "time" 8 "time"
9 9
10 "github.com/luci/luci-go/common/clock" 10 "github.com/luci/luci-go/common/clock"
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
85 "currentHash": lastHash, 85 "currentHash": lastHash,
86 }.Debugf(c, "Content hash matches.") 86 }.Debugf(c, "Content hash matches.")
87 } 87 }
88 } 88 }
89 } 89 }
90 90
91 // Refresh reloads the configuration value, updating ContentHash. 91 // Refresh reloads the configuration value, updating ContentHash.
92 func (p *ChangePoller) Refresh(c context.Context) error { 92 func (p *ChangePoller) Refresh(c context.Context) error {
93 var meta cfgclient.Meta 93 var meta cfgclient.Meta
94 if err := cfgclient.Get(c, cfgclient.AsService, p.ConfigSet, p.Path, nil , &meta); err != nil { 94 if err := cfgclient.Get(c, cfgclient.AsService, p.ConfigSet, p.Path, nil , &meta); err != nil {
95 » » return errors.Annotate(err).Reason("failed to reload config %(co nfigSet)s :: %(path)s"). 95 » » return errors.Annotate(err, "failed to reload config %s :: %s", p.ConfigSet, p.Path).Err()
96 » » » D("configSet", p.ConfigSet).
97 » » » D("path", p.Path).
98 » » » Err()
99 } 96 }
100 97
101 p.ContentHash = meta.ContentHash 98 p.ContentHash = meta.ContentHash
102 return nil 99 return nil
103 } 100 }
OLDNEW
« no previous file with comments | « logdog/server/archivist/archivist.go ('k') | logdog/server/service/service.go » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698