|
|
@ -23,7 +23,6 @@ import org.pmw.tinylog.Logger; |
|
|
|
|
|
|
|
|
|
|
|
import java.util.ArrayList; |
|
|
|
import java.util.ArrayList; |
|
|
|
import java.util.HashMap; |
|
|
|
import java.util.HashMap; |
|
|
|
import java.util.Objects; |
|
|
|
|
|
|
|
import java.util.concurrent.BlockingQueue; |
|
|
|
import java.util.concurrent.BlockingQueue; |
|
|
|
import java.util.concurrent.DelayQueue; |
|
|
|
import java.util.concurrent.DelayQueue; |
|
|
|
import java.util.concurrent.ThreadLocalRandom; |
|
|
|
import java.util.concurrent.ThreadLocalRandom; |
|
|
@ -53,11 +52,6 @@ public enum ForgeManager implements Runnable { |
|
|
|
Logger.error(e); |
|
|
|
Logger.error(e); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// Completed or canceled work orders are not re-enqueued
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (Objects.requireNonNull(workOrder).runCanceled || workOrder.runCompleted) |
|
|
|
|
|
|
|
continue; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (workOrder.total_produced >= workOrder.total_to_produce) { |
|
|
|
if (workOrder.total_produced >= workOrder.total_to_produce) { |
|
|
|
|
|
|
|
|
|
|
|
// Complete this workOrder.
|
|
|
|
// Complete this workOrder.
|
|
|
|