Hey,
The core issue: getStatus() / isBusy() don't account for invoked (execute()) runs. The state machine only flips to 'running' when execution.reason === 'scheduled', so a manually invoked run is invisible to it.
That's also why noOverlap doesn't help here - it checks lastExecution's state, which relies on the same state machine. Fix getStatus() to track invoked runs too, and noOverlap should just work for execute() as a side effect.
Same behavior on 4.2.1 and 4.6.0.
Intentional, or worth a PR?
Hey,
The core issue:
getStatus()/isBusy()don't account for invoked (execute()) runs. The state machine only flips to'running'whenexecution.reason === 'scheduled', so a manually invoked run is invisible to it.That's also why
noOverlapdoesn't help here - it checkslastExecution's state, which relies on the same state machine. FixgetStatus()to track invoked runs too, andnoOverlapshould just work forexecute()as a side effect.Same behavior on 4.2.1 and 4.6.0.
Intentional, or worth a PR?