Persistent Tasks: remove unused isCurrentStatus method (#2076)
Removes a method that is no longer used in production code. Relates to #957
This commit is contained in:
parent
0d50f9c6a9
commit
ffdb05e48e
|
@ -406,14 +406,6 @@ public final class PersistentTasksCustomMetaData extends AbstractNamedDiffable<M
|
|||
return status;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return Whether the task status isn't stale. When a task gets unassigned from the executor node or assigned
|
||||
* to a new executor node and the status hasn't been updated then the task status is stale.
|
||||
*/
|
||||
public boolean isCurrentStatus() {
|
||||
return allocationIdOnLastStatusUpdate != null && allocationIdOnLastStatusUpdate == allocationId;
|
||||
}
|
||||
|
||||
@Override
|
||||
public XContentBuilder toXContent(XContentBuilder builder, ToXContent.Params xParams) throws IOException {
|
||||
builder.startObject();
|
||||
|
|
|
@ -202,7 +202,7 @@ public class PersistentTasksExecutorIT extends ESIntegTestCase {
|
|||
int finalI = i;
|
||||
WaitForPersistentTaskStatusFuture<?> future1 = new WaitForPersistentTaskStatusFuture<>();
|
||||
persistentTasksService.waitForPersistentTaskStatus(taskId,
|
||||
task -> task != null && task.isCurrentStatus() && task.getStatus().toString() != null &&
|
||||
task -> task != null && task.getStatus() != null && task.getStatus().toString() != null &&
|
||||
task.getStatus().toString().equals("{\"phase\":\"phase " + (finalI + 1) + "\"}"),
|
||||
TimeValue.timeValueSeconds(10), future1);
|
||||
assertThat(future1.get().getId(), equalTo(taskId));
|
||||
|
|
Loading…
Reference in New Issue