AbandonUtil: Keep trying to abandon more changes despite single failure

Before this change, the whole changes abandoning campaign aborted out of
the first failing abandon act encountered.

Change-Id: Ibe7ac031d8a987bf72c20c9c4d585c23b7c6117e
This commit is contained in:
Marco Miller
2019-03-19 16:25:58 -04:00
parent 34029f7778
commit 6ad93685e0

View File

@@ -75,8 +75,12 @@ public class AbandonUtil {
ImmutableListMultimap.Builder<Project.NameKey, ChangeControl> builder =
ImmutableListMultimap.builder();
for (ChangeData cd : changesToAbandon) {
ChangeControl control = cd.changeControl(internalUser);
builder.put(control.getProject().getNameKey(), control);
try {
ChangeControl control = cd.changeControl(internalUser);
builder.put(control.getProject().getNameKey(), control);
} catch (OrmException e) {
log.warn("Failed to query inactive open change for auto-abandoning.", e);
}
}
int count = 0;