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

Side by Side Diff: appengine/logdog/coordinator/archivalPublisher.go

Issue 1910633006: LogDog: Support per-namespace expired archival. (Closed) Base URL: https://github.com/luci/luci-go@logdog-coordinator-svcdec
Patch Set: Update another test. Created 4 years, 7 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
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 package coordinator 5 package coordinator
6 6
7 import ( 7 import (
8 "time" 8 "time"
9 9
10 "github.com/golang/protobuf/proto" 10 "github.com/golang/protobuf/proto"
(...skipping 23 matching lines...) Expand all
34 } 34 }
35 35
36 // TODO: Route this through some system (e.g., task queue, tumble) that can 36 // TODO: Route this through some system (e.g., task queue, tumble) that can
37 // impose a dispatch delay for the settle period. 37 // impose a dispatch delay for the settle period.
38 msg := gcps.Message{ 38 msg := gcps.Message{
39 Data: d, 39 Data: d,
40 } 40 }
41 41
42 return retry.Retry(c, retry.Default, func() error { 42 return retry.Retry(c, retry.Default, func() error {
43 log.Fields{ 43 log.Fields{
44 » » » "path": t.Path, 44 » » » "project": t.Project,
45 » » » "key": t.Key, 45 » » » "path": t.Path,
46 » » » "key": t.Key,
46 }.Infof(c, "Publishing archival message for stream.") 47 }.Infof(c, "Publishing archival message for stream.")
47 48
48 _, err := p.topic.Publish(c, &msg) 49 _, err := p.topic.Publish(c, &msg)
49 return err 50 return err
50 }, func(err error, d time.Duration) { 51 }, func(err error, d time.Duration) {
51 log.Fields{ 52 log.Fields{
52 log.ErrorKey: err, 53 log.ErrorKey: err,
53 "delay": d, 54 "delay": d,
54 }.Warningf(c, "Failed to publish task. Retrying...") 55 }.Warningf(c, "Failed to publish task. Retrying...")
55 }) 56 })
56 } 57 }
OLDNEW
« no previous file with comments | « appengine/logdog/coordinator/archival.go ('k') | appengine/logdog/coordinator/backend/archiveCron.go » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698