Skip to content

Commit

Permalink
Tentatively fix campaign mgmt OOME (MID-4479)
Browse files Browse the repository at this point in the history
  • Loading branch information
mederly committed Feb 28, 2018
1 parent b5f40b8 commit 8ae6f53
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
Expand Up @@ -446,6 +446,14 @@ public static <T extends ObjectType> IModel<ObjectWrapper<T>> adopt(
return objectWrapperModel;
}

public static void safeResultCleanup(OperationResult result, Trace logger) {
try {
result.cleanupResult();
} catch (Throwable t) {
LoggingUtils.logUnexpectedException(logger, "Couldn't clean up the operation result", t);
}
}

public enum Channel {
// TODO: move this to schema component
LIVE_SYNC(SchemaConstants.CHANGE_CHANNEL_LIVE_SYNC_URI),
Expand Down
Expand Up @@ -505,6 +505,7 @@ private void executeCampaignStateOperation(AjaxRequestTarget target, String acti
result.computeStatusIfUnknown();
}

WebComponentUtil.safeResultCleanup(result, LOGGER);
showResult(result);
statModel.reset();
campaignModel.reset();
Expand All @@ -513,7 +514,6 @@ private void executeCampaignStateOperation(AjaxRequestTarget target, String acti
target.add(getFeedbackPanel());
}


private ObjectQuery createCaseQuery() {
ObjectQuery query = new ObjectQuery();
return query;
Expand Down

0 comments on commit 8ae6f53

Please sign in to comment.