Skip to content

Commit

Permalink
removing sleeps and increasing timeout
Browse files Browse the repository at this point in the history
Signed-off-by: Fernando Rocha <fernando@diagrid.io>
  • Loading branch information
rochabr committed Jul 25, 2024
1 parent d64d200 commit 20dafba
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 9 deletions.
2 changes: 1 addition & 1 deletion jobs/go/sdk/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ output_match_mode: substring
match_order: none
background: true
sleep: 120
timeout_seconds: 180
timeout_seconds: 240
-->

```bash
Expand Down
10 changes: 2 additions & 8 deletions jobs/go/sdk/job-scheduler/job-scheduler.go
Original file line number Diff line number Diff line change
Expand Up @@ -62,16 +62,12 @@ func main() {
log.Fatalln("Error scheduling job: ", err)
}

time.Sleep(3 * time.Second)

// Schedule C-3PO job
err = schedule(droidJobs[1])
if err != nil {
log.Fatalln("Error scheduling job: ", err)
}

time.Sleep(5 * time.Second)

// Get C-3PO job
resp, err := get(droidJobs[1])
if err != nil {
Expand All @@ -85,23 +81,21 @@ func main() {
log.Fatalln("Error scheduling job: ", err)
}

time.Sleep(5 * time.Second)

// Get BB-8 job
resp, err = get(droidJobs[2])
if err != nil {
log.Fatalln("Error retrieving job: ", err)
}
fmt.Println("Get job response: ", resp)

time.Sleep(5 * time.Second)

// Delete BB-8 job
err = delete(droidJobs[2])
if err != nil {
log.Fatalln("Error deleting job: ", err)
}
fmt.Println("Job deleted: ", droidJobs[2].Name)

//time.Sleep(15 * time.Second)
}

// Schedules a job by invoking grpc service from job-service passing a DroidJob as an argument
Expand Down

0 comments on commit 20dafba

Please sign in to comment.