Consistent defaults for _open job (elastic/x-pack-elasticsearch#578)
Matches OpenJobAction Original commit: elastic/x-pack-elasticsearch@24c07913a1
This commit is contained in:
parent
545921698c
commit
c5506b7440
|
@ -38,9 +38,9 @@ public class RestOpenJobAction extends BaseRestHandler {
|
||||||
request = OpenJobAction.Request.parseRequest(restRequest.param(Job.ID.getPreferredName()), restRequest.contentParser());
|
request = OpenJobAction.Request.parseRequest(restRequest.param(Job.ID.getPreferredName()), restRequest.contentParser());
|
||||||
} else {
|
} else {
|
||||||
request = new OpenJobAction.Request(restRequest.param(Job.ID.getPreferredName()));
|
request = new OpenJobAction.Request(restRequest.param(Job.ID.getPreferredName()));
|
||||||
request.setIgnoreDowntime(restRequest.paramAsBoolean(OpenJobAction.Request.IGNORE_DOWNTIME.getPreferredName(), false));
|
request.setIgnoreDowntime(restRequest.paramAsBoolean(OpenJobAction.Request.IGNORE_DOWNTIME.getPreferredName(), true));
|
||||||
if (restRequest.hasParam("timeout")) {
|
if (restRequest.hasParam("timeout")) {
|
||||||
TimeValue openTimeout = restRequest.paramAsTime("timeout", TimeValue.timeValueSeconds(30));
|
TimeValue openTimeout = restRequest.paramAsTime("timeout", TimeValue.timeValueSeconds(20));
|
||||||
request.setTimeout(openTimeout);
|
request.setTimeout(openTimeout);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue