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

Side by Side Diff: task_scheduler/go/scheduling/cache_wrapper.go

Issue 2296763008: [task scheduler] Move files from build_scheduler/ to task_scheduler/ (Closed) Base URL: https://skia.googlesource.com/buildbot@master
Patch Set: Created 4 years, 3 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
1 package task_scheduler 1 package scheduling
2 2
3 import ( 3 import (
4 "fmt" 4 "fmt"
5 5
6 » "go.skia.org/infra/build_scheduler/go/db" 6 » "go.skia.org/infra/task_scheduler/go/db"
7 ) 7 )
8 8
9 // cacheWrapper is an implementation of db.TaskCache which allows insertion of 9 // cacheWrapper is an implementation of db.TaskCache which allows insertion of
10 // fake Tasks. Use one per task spec. 10 // fake Tasks. Use one per task spec.
11 type cacheWrapper struct { 11 type cacheWrapper struct {
12 byCommit map[string]*db.Task 12 byCommit map[string]*db.Task
13 byId map[string]*db.Task 13 byId map[string]*db.Task
14 c db.TaskCache 14 c db.TaskCache
15 known bool 15 known bool
16 } 16 }
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
65 65
66 // insert adds a task to the cacheWrapper's fake layer so that it will be 66 // insert adds a task to the cacheWrapper's fake layer so that it will be
67 // included in query results but not actually inserted into the DB. 67 // included in query results but not actually inserted into the DB.
68 func (c *cacheWrapper) insert(t *db.Task) { 68 func (c *cacheWrapper) insert(t *db.Task) {
69 c.byId[t.Id] = t 69 c.byId[t.Id] = t
70 for _, commit := range t.Commits { 70 for _, commit := range t.Commits {
71 c.byCommit[commit] = t 71 c.byCommit[commit] = t
72 } 72 }
73 c.known = true 73 c.known = true
74 } 74 }
OLDNEW
« no previous file with comments | « task_scheduler/go/parse_task_cfg/main.go ('k') | task_scheduler/go/scheduling/perftest/perftest.go » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698