NIFI-5944: If processor is no longer scheduled to run after a failed trigger of @OnScheduled, ensure that we set scheduled status to STOPPED

This closes #3263
This commit is contained in:
Mark Payne 2019-01-10 16:33:55 -05:00 committed by Matt Gilman
parent 2bbfb3217b
commit 89adb039d2
No known key found for this signature in database
GPG Key ID: DF61EC19432AEE37
1 changed files with 1 additions and 0 deletions

View File

@ -1485,6 +1485,7 @@ public class StandardProcessorNode extends ProcessorNode implements Connectable
if (currentScheduleState == ScheduledState.STOPPING || currentScheduleState == ScheduledState.STOPPED) {
LOG.debug("{} is stopped. Will not call @OnScheduled lifecycle methods or begin trigger onTrigger() method", StandardProcessorNode.this);
schedulingAgentCallback.onTaskComplete();
scheduledState.set(ScheduledState.STOPPED);
return null;
}