From 0564a5fa4cd2acce1cb92549f09d0ad69eca529b Mon Sep 17 00:00:00 2001 From: jiangkaihua Date: Mon, 9 Dec 2019 03:01:08 +0000 Subject: [PATCH] disp job in default queue Signed-off-by: jiangkaihua --- pkg/cli/job/run.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/pkg/cli/job/run.go b/pkg/cli/job/run.go index 4a0ab8bbdf..3c0131321f 100644 --- a/pkg/cli/job/run.go +++ b/pkg/cli/job/run.go @@ -72,7 +72,7 @@ func RunJob() error { return err } - if launchJobFlags.Name == "" { + if launchJobFlags.Name == "" && launchJobFlags.FileName == "" { err = fmt.Errorf("job name cannot be left blank") return err } @@ -102,6 +102,10 @@ func RunJob() error { return err } + if newJob.Spec.Queue == "" { + newJob.Spec.Queue = "default" + } + fmt.Printf("run job %v successfully\n", newJob.Name) return nil