One at once
This commit is contained in:
parent
8827c02861
commit
eb79bc4fbc
@ -146,6 +146,19 @@ func processQueue(ctx context.Context) {
|
||||
case <-ctx.Done():
|
||||
return
|
||||
default:
|
||||
q := GetQueue()
|
||||
buildingFound := false
|
||||
q.ForEach(func(k string, item domain.BuildQueueItem) bool {
|
||||
if item.Status == domain.Building {
|
||||
buildingFound = true
|
||||
return false
|
||||
}
|
||||
return true
|
||||
})
|
||||
if buildingFound {
|
||||
time.Sleep(30 * time.Second)
|
||||
continue
|
||||
}
|
||||
err := ProcessNext()
|
||||
if err != nil {
|
||||
slog.Error("unable to process queue: " + err.Error())
|
||||
|
Loading…
Reference in New Issue
Block a user