diff --git a/components/ide/jetbrains/image/status/main.go b/components/ide/jetbrains/image/status/main.go index 417ae728c2c95f..9680b6cf559671 100644 --- a/components/ide/jetbrains/image/status/main.go +++ b/components/ide/jetbrains/image/status/main.go @@ -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" {