| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 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 | 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 backend | 5 package backend |
| 6 | 6 |
| 7 import ( | 7 import ( |
| 8 "github.com/julienschmidt/httprouter" | 8 "github.com/julienschmidt/httprouter" |
| 9 "github.com/luci/luci-go/appengine/gaemiddleware" | 9 "github.com/luci/luci-go/appengine/gaemiddleware" |
| 10 "github.com/luci/luci-go/appengine/logdog/coordinator" | 10 "github.com/luci/luci-go/appengine/logdog/coordinator" |
| (...skipping 18 matching lines...) Expand all Loading... |
| 29 | 29 |
| 30 func (b *Backend) getMultiTaskBatchSize() int { | 30 func (b *Backend) getMultiTaskBatchSize() int { |
| 31 if v := b.multiTaskBatchSize; v > 0 { | 31 if v := b.multiTaskBatchSize; v > 0 { |
| 32 return v | 32 return v |
| 33 } | 33 } |
| 34 return defaultMultiTaskBatchSize | 34 return defaultMultiTaskBatchSize |
| 35 } | 35 } |
| 36 | 36 |
| 37 // InstallHandlers installs handlers for the Backend. | 37 // InstallHandlers installs handlers for the Backend. |
| 38 func (b *Backend) InstallHandlers(r *httprouter.Router, h middleware.Base) { | 38 func (b *Backend) InstallHandlers(r *httprouter.Router, h middleware.Base) { |
| 39 » r.GET("/archive/cron/terminal", h(gaemiddleware.RequireCron(b.HandleArch
iveCron))) | 39 » r.GET("/archive/cron", h(gaemiddleware.RequireCron(b.HandleArchiveCron))
) |
| 40 » r.GET("/archive/cron/nonterminal", h(gaemiddleware.RequireCron(b.HandleA
rchiveCronNT))) | |
| 41 » r.GET("/archive/cron/purge", h(b.HandleArchiveCronPurge)) | |
| 42 } | 40 } |
| OLD | NEW |