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

Side by Side Diff: appengine/logdog/coordinator/backend/backend.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
(Empty)
1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 package backend
6
7 import (
8 "github.com/julienschmidt/httprouter"
9 "github.com/luci/luci-go/appengine/gaemiddleware"
10 "github.com/luci/luci-go/server/middleware"
11 )
12
13 const (
14 // defaultMultiTaskBatchSize is the default value for Backend's
15 // multiTaskBatchSize parameter.
16 defaultMultiTaskBatchSize = 100
17 )
18
19 // Backend is the base struct for all Backend handlers. It is mostly used to
20 // configure testing parameters.
21 type Backend struct {
22 // multiTaskBatchSize is the number of batch tasks to create at a time.
23 multiTaskBatchSize int
24 }
25
26 func (b *Backend) getMultiTaskBatchSize() int {
27 if v := b.multiTaskBatchSize; v > 0 {
28 return v
29 }
30 return defaultMultiTaskBatchSize
31 }
32
33 // InstallHandlers installs handlers for the Backend.
34 func (b *Backend) InstallHandlers(r *httprouter.Router, h middleware.Base) {
35 r.GET("/archive/cron", h(gaemiddleware.RequireCron(b.HandleArchiveCron)) )
36 }
OLDNEW
« no previous file with comments | « appengine/logdog/coordinator/backend/archiveCron_test.go ('k') | appengine/logdog/coordinator/backend/doc.go » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698