Skip to content

Commit

Permalink
spotlessApply
Browse files Browse the repository at this point in the history
  • Loading branch information
masseyke committed Dec 12, 2024
1 parent c514089 commit 0f0eafa
Showing 1 changed file with 11 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -90,23 +90,19 @@ private void cancelTaskOnThisNode(String persistentTaskId, ActionListener<Acknow
);
} else {
// Calling sendRemoveRequest results in the task (and its child tasks) being cancelled
persistentTasksService.sendRemoveRequest(
persistentTaskId,
TimeValue.MAX_VALUE,
new ActionListener<>() {
@Override
public void onResponse(PersistentTasksCustomMetadata.PersistentTask<?> persistentTask) {
// Calling unregister removes the task from the /_tasks list
taskManager.unregister(runningTask);
listener.onResponse(AcknowledgedResponse.TRUE);
}
persistentTasksService.sendRemoveRequest(persistentTaskId, TimeValue.MAX_VALUE, new ActionListener<>() {
@Override
public void onResponse(PersistentTasksCustomMetadata.PersistentTask<?> persistentTask) {
// Calling unregister removes the task from the /_tasks list
taskManager.unregister(runningTask);
listener.onResponse(AcknowledgedResponse.TRUE);
}

@Override
public void onFailure(Exception e) {
listener.onFailure(e);
}
@Override
public void onFailure(Exception e) {
listener.onFailure(e);
}
);
});
}
}

Expand Down

0 comments on commit 0f0eafa

Please sign in to comment.