Skip to content

Commit 4767a1d

Browse files
author
Andrea Falzetti
committed
fix loop
1 parent a6ffb2c commit 4767a1d

File tree

1 file changed

+5
-5
lines changed
  • components/ide/jetbrains/image/status

1 file changed

+5
-5
lines changed

components/ide/jetbrains/image/status/main.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -165,13 +165,13 @@ func main() {
165165
ctx, cancel := context.WithTimeout(context.Background(), 5*time.Second)
166166
defer cancel()
167167

168-
tasks, err := getTasksList(ctx)
169-
if err != nil {
170-
log.Fatalf("cannot get task list: %s", err)
171-
}
172-
173168
// todo: add max timeout (prebuild timeout is 1 hour)
174169
for {
170+
tasks, err := getTasksList(ctx)
171+
if err != nil {
172+
log.Fatalf("cannot get task list: %s", err)
173+
}
174+
175175
var runningTasksCounter int
176176
for _, task := range tasks {
177177
if task.State != 2 && task.Presentation.Name != "GITPOD_JB_WARMUP_TASK" {

0 commit comments

Comments
 (0)