One at once
This commit is contained in:
parent
8827c02861
commit
eb79bc4fbc
@ -146,6 +146,19 @@ func processQueue(ctx context.Context) {
|
|||||||
case <-ctx.Done():
|
case <-ctx.Done():
|
||||||
return
|
return
|
||||||
default:
|
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()
|
err := ProcessNext()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
slog.Error("unable to process queue: " + err.Error())
|
slog.Error("unable to process queue: " + err.Error())
|
||||||
|
Loading…
Reference in New Issue
Block a user