Consistent defaults for _open job (elastic/x-pack-elasticsearch#578)

Matches OpenJobAction

Original commit: elastic/x-pack-elasticsearch@24c07913a1
This commit is contained in:
David Kyle 2017-02-16 15:41:20 +00:00 committed by GitHub
parent 545921698c
commit c5506b7440
1 changed files with 2 additions and 2 deletions

View File

@ -38,9 +38,9 @@ public class RestOpenJobAction extends BaseRestHandler {
request = OpenJobAction.Request.parseRequest(restRequest.param(Job.ID.getPreferredName()), restRequest.contentParser());
} else {
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")) {
TimeValue openTimeout = restRequest.paramAsTime("timeout", TimeValue.timeValueSeconds(30));
TimeValue openTimeout = restRequest.paramAsTime("timeout", TimeValue.timeValueSeconds(20));
request.setTimeout(openTimeout);
}
}