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

Unified Diff: scheduler/appengine/engine/engine.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 side-by-side diff with in-line comments
Download patch
Index: scheduler/appengine/engine/engine.go
diff --git a/scheduler/appengine/engine/engine.go b/scheduler/appengine/engine/engine.go
index 6aa52893e2ba00001d9ac372da1b84d74a6814f3..59488dc1bc5ef02b1dbc941b654695874ceed098 100644
--- a/scheduler/appengine/engine/engine.go
+++ b/scheduler/appengine/engine/engine.go
@@ -257,6 +257,13 @@ type Job struct {
State JobState
}
+// GetJobName returns name of this Job as defined its project's config.
+func (e *Job) GetJobName() string {
+ // JobID has form <project>/<id>. Split it into components.
+ chunks := strings.Split(e.JobID, "/")
+ return chunks[1]
+}
+
// effectiveSchedule returns schedule string to use for the job, considering its
// Paused field.
//
« no previous file with comments | « scheduler/appengine/apiservers/scheduler_test.go ('k') | scheduler/appengine/frontend/templates/includes/base.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698