Adding API call to get tasks without a fully hydrated object which results in less overhead
This commit is contained in:
parent
8c29330e06
commit
99ea6aa094
2 changed files with 52 additions and 0 deletions
|
@ -468,6 +468,20 @@ func main() {
|
|||
fmt.Printf("length: %d\n ", len(tasks))
|
||||
fmt.Printf("tasks: %+v\n", tasks)
|
||||
|
||||
case "tasksWithoutConfig":
|
||||
fmt.Println("Getting task status")
|
||||
taskQ := &aurora.TaskQuery{Role: job.JobKey().Role,
|
||||
Environment: job.JobKey().Environment,
|
||||
JobName: job.JobKey().Name,
|
||||
}
|
||||
tasks, err := r.GetTasksWithoutConfigs(taskQ)
|
||||
if err != nil {
|
||||
fmt.Printf("error: %+v\n ", err)
|
||||
os.Exit(1)
|
||||
}
|
||||
fmt.Printf("length: %d\n ", len(tasks))
|
||||
fmt.Printf("tasks: %+v\n", tasks)
|
||||
|
||||
default:
|
||||
fmt.Println("Command not supported")
|
||||
os.Exit(1)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue