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

Unified Diff: appengine/logdog/coordinator/backend/backend.go

Issue 1844963002: Iterate archive query alongside task queue. (Closed) Base URL: https://github.com/luci/luci-go@collector-gae-classic
Patch Set: Respond to code review comments. Created 4 years, 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « appengine/logdog/coordinator/backend/archiveCron.go ('k') | appengine/logdog/coordinator/backend/util.go » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: appengine/logdog/coordinator/backend/backend.go
diff --git a/appengine/logdog/coordinator/backend/backend.go b/appengine/logdog/coordinator/backend/backend.go
index 194bf086dfda90fc4f11749b7b1e03bbe4e5e196..ff1218ce63c04e513f4a650bbcf5bd16b2cd2e11 100644
--- a/appengine/logdog/coordinator/backend/backend.go
+++ b/appengine/logdog/coordinator/backend/backend.go
@@ -11,6 +11,12 @@ import (
"github.com/luci/luci-go/server/middleware"
)
+const (
+ // defaultMultiTaskBatchSize is the default value for Backend's
+ // multiTaskBatchSize parameter.
+ defaultMultiTaskBatchSize = 100
+)
+
// Backend is the base struct for all Backend handlers. It is mostly used to
// configure testing parameters.
type Backend struct {
@@ -21,6 +27,13 @@ type Backend struct {
s coordinator.Service
}
+func (b *Backend) getMultiTaskBatchSize() int {
+ if v := b.multiTaskBatchSize; v > 0 {
+ return v
+ }
+ return defaultMultiTaskBatchSize
+}
+
// InstallHandlers installs handlers for the Backend.
func (b *Backend) InstallHandlers(r *httprouter.Router, h middleware.Base) {
r.GET("/archive/cron/terminal", h(gaemiddleware.RequireCron(b.HandleArchiveCron)))
« no previous file with comments | « appengine/logdog/coordinator/backend/archiveCron.go ('k') | appengine/logdog/coordinator/backend/util.go » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698