Skip to content

Commit

Permalink
fix loop
Browse files Browse the repository at this point in the history
  • Loading branch information
Andrea Falzetti committed Dec 12, 2022
1 parent a6ffb2c commit 4767a1d
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions components/ide/jetbrains/image/status/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -165,13 +165,13 @@ func main() {
ctx, cancel := context.WithTimeout(context.Background(), 5*time.Second)
defer cancel()

tasks, err := getTasksList(ctx)
if err != nil {
log.Fatalf("cannot get task list: %s", err)
}

// todo: add max timeout (prebuild timeout is 1 hour)
for {
tasks, err := getTasksList(ctx)
if err != nil {
log.Fatalf("cannot get task list: %s", err)
}

var runningTasksCounter int
for _, task := range tasks {
if task.State != 2 && task.Presentation.Name != "GITPOD_JB_WARMUP_TASK" {
Expand Down

0 comments on commit 4767a1d

Please sign in to comment.