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

Side by Side Diff: scheduler/appengine/apiservers/scheduler.go

Issue 2948103002: scheduler: rename JobID to JobName to avoid overloading JobID meaning. (Closed)
Patch Set: more js lowercase Created 3 years, 6 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 // Copyright 2016 The LUCI Authors. All rights reserved. 1 // Copyright 2016 The LUCI Authors. All rights reserved.
2 // Use of this source code is governed under the Apache License, Version 2.0 2 // Use of this source code is governed under the Apache License, Version 2.0
3 // that can be found in the LICENSE file. 3 // that can be found in the LICENSE file.
4 4
5 package apiservers 5 package apiservers
6 6
7 import ( 7 import (
8 "github.com/luci/luci-go/scheduler/api/scheduler/v1" 8 "github.com/luci/luci-go/scheduler/api/scheduler/v1"
9 "github.com/luci/luci-go/scheduler/appengine/catalog" 9 "github.com/luci/luci-go/scheduler/appengine/catalog"
10 "github.com/luci/luci-go/scheduler/appengine/engine" 10 "github.com/luci/luci-go/scheduler/appengine/engine"
(...skipping 24 matching lines...) Expand all
35 return nil, grpc.Errorf(codes.Internal, "datastore error: %s", e rr) 35 return nil, grpc.Errorf(codes.Internal, "datastore error: %s", e rr)
36 } 36 }
37 37
38 jobs := make([]*scheduler.Job, len(ejobs)) 38 jobs := make([]*scheduler.Job, len(ejobs))
39 for i, ej := range ejobs { 39 for i, ej := range ejobs {
40 traits, err := presentation.GetJobTraits(ctx, s.Catalog, ej) 40 traits, err := presentation.GetJobTraits(ctx, s.Catalog, ej)
41 if err != nil { 41 if err != nil {
42 return nil, grpc.Errorf(codes.Internal, "failed to get t raits: %s", err) 42 return nil, grpc.Errorf(codes.Internal, "failed to get t raits: %s", err)
43 } 43 }
44 jobs[i] = &scheduler.Job{ 44 jobs[i] = &scheduler.Job{
45 » » » Id: ej.JobID, 45 » » » Name: ej.GetJobName(),
46 Project: ej.ProjectID, 46 Project: ej.ProjectID,
47 Schedule: ej.Schedule, 47 Schedule: ej.Schedule,
48 State: &scheduler.JobState{ 48 State: &scheduler.JobState{
49 UiStatus: string(presentation.GetPublicStateKind (ej, traits)), 49 UiStatus: string(presentation.GetPublicStateKind (ej, traits)),
50 }, 50 },
51 } 51 }
52 } 52 }
53 return &scheduler.JobsReply{Jobs: jobs}, nil 53 return &scheduler.JobsReply{Jobs: jobs}, nil
54 } 54 }
OLDNEW
« no previous file with comments | « scheduler/api/scheduler/v1/scheduler.pb.go ('k') | scheduler/appengine/apiservers/scheduler_test.go » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698