Commit 4ce4fde8 authored by nanahira's avatar nanahira

fix dispatcher active

parent 6060b9c8
......@@ -443,7 +443,7 @@ export class WorkflowDispatcher<F extends (...args: any[]) => Promise<any>> {
private isEligibleActive(i: number, now: number) {
const slot = this.slots[i] as ActiveSlot<F>;
const slotGood = (s: ActiveSlot<F>) =>
s.kind === 'active' && !s.state.running;
s.kind === 'active' && !s.state?.running;
if (!slotGood(slot)) return false;
if (now >= slot.state.nextAvailableAt) return true;
return !this.slots.some((other: ActiveSlot<F>, j) => {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment