| OLD | NEW |
| 1 // Copyright 2015 The LUCI Authors. All rights reserved. | 1 // Copyright 2015 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 tumble | 5 package tumble |
| 6 | 6 |
| 7 import ( | 7 import ( |
| 8 "fmt" | 8 "fmt" |
| 9 "math" | 9 "math" |
| 10 "time" | 10 "time" |
| (...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 71 Path: processURL(eta, shard.shard), | 71 Path: processURL(eta, shard.shard), |
| 72 | 72 |
| 73 ETA: eta.Unix(), | 73 ETA: eta.Unix(), |
| 74 | 74 |
| 75 // TODO(riannucci): Tune RetryOptions? | 75 // TODO(riannucci): Tune RetryOptions? |
| 76 } | 76 } |
| 77 tasks = append(tasks, tsk) | 77 tasks = append(tasks, tsk) |
| 78 logging.Infof(c, "added task %q %s %s", tsk.Name, tsk.Path, tsk.
ETA) | 78 logging.Infof(c, "added task %q %s %s", tsk.Name, tsk.Path, tsk.
ETA) |
| 79 } | 79 } |
| 80 | 80 |
| 81 » if err := errors.Filter(tq.Add(ds.WithoutTransaction(c), baseName, tasks
...), tq.ErrTaskAlreadyAdded); err != nil { | 81 » b := tq.Batcher{} |
| 82 » if err := errors.Filter(b.Add(ds.WithoutTransaction(c), baseName, tasks.
..), tq.ErrTaskAlreadyAdded); err != nil { |
| 82 logging.Warningf(c, "attempted to fire tasks %v, but failed: %s"
, shards, err) | 83 logging.Warningf(c, "attempted to fire tasks %v, but failed: %s"
, shards, err) |
| 83 return false | 84 return false |
| 84 } | 85 } |
| 85 return true | 86 return true |
| 86 } | 87 } |
| OLD | NEW |