Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Do not unregister completed executions when iterating over FlowExecutionList to avoid unnecessary log warnings #304

Merged
merged 5 commits into from
Aug 28, 2023
Merged
Original file line number Diff line number Diff line change
Expand Up @@ -80,20 +80,15 @@ public FlowExecutionList() {
*/
@Override
public Iterator<FlowExecution> iterator() {
return new AbstractIterator<FlowExecution>() {
return new AbstractIterator<>() {
final Iterator<FlowExecutionOwner> base = runningTasks.iterator();

@Override
protected FlowExecution computeNext() {
while (base.hasNext()) {
FlowExecutionOwner o = base.next();
try {
FlowExecution e = o.get();
if (e.isComplete()) {
unregister(o);
} else {
return e;
}
return o.get();
jglick marked this conversation as resolved.
Show resolved Hide resolved
} catch (Throwable e) {
LOGGER.log(Level.FINE, "Failed to load " + o + ". Unregistering", e);
unregister(o);
Expand Down