Skip to content

Commit

Permalink
disp job in default queue
Browse files Browse the repository at this point in the history
Signed-off-by: jiangkaihua <jiangkaihua1@huawei.com>
  • Loading branch information
jiangkaihua committed Dec 9, 2019
1 parent aa70e97 commit 0564a5f
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion pkg/cli/job/run.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 0564a5f

Please sign in to comment.