Chromium Code Reviews| 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/server/middleware" | 10 "github.com/luci/luci-go/server/middleware" |
| (...skipping 15 matching lines...) Expand all Loading... | |
| 26 func (b *Backend) getMultiTaskBatchSize() int { | 26 func (b *Backend) getMultiTaskBatchSize() int { |
| 27 if v := b.multiTaskBatchSize; v > 0 { | 27 if v := b.multiTaskBatchSize; v > 0 { |
| 28 return v | 28 return v |
| 29 } | 29 } |
| 30 return defaultMultiTaskBatchSize | 30 return defaultMultiTaskBatchSize |
| 31 } | 31 } |
| 32 | 32 |
| 33 // InstallHandlers installs handlers for the Backend. | 33 // InstallHandlers installs handlers for the Backend. |
| 34 func (b *Backend) InstallHandlers(r *httprouter.Router, h middleware.Base) { | 34 func (b *Backend) InstallHandlers(r *httprouter.Router, h middleware.Base) { |
| 35 r.GET("/archive/cron", h(gaemiddleware.RequireCron(b.HandleArchiveCron)) ) | 35 r.GET("/archive/cron", h(gaemiddleware.RequireCron(b.HandleArchiveCron)) ) |
| 36 r.POST("/archive/cron/scan", h(gaemiddleware.RequireTaskQueue("", b.Hand leArchiveScanTask))) | |
|
Ryan Tseng
2016/04/28 20:16:03
nit: this could be less than 80
| |
| 36 } | 37 } |
| OLD | NEW |