Hi.
Lets say my runner threw a
RunnerException during run request, as a result the status request for that runner Pid returns Faild.
The
ApplicationProcessDescriptor doesn’t contain the Stop link , following the logic implemented in stop of
RunnerService. getStatus
Now , I would like to stop that runner process but can't , because of the following code in RemoteRunnerProcess :
public ApplicationProcessDescriptor stop()
throws RunnerException, NotFoundException {
final ApplicationProcessDescriptor
descriptor = getApplicationProcessDescriptor();
final Link
link =
descriptor.getLink(Constants.LINK_REL_STOP);
if (link
== null) {
switch (descriptor.getStatus())
{
case
STOPPED:
case
CANCELLED:
LOG.debug("Can't stop process,
status is {}",
descriptor.getStatus());
return
descriptor;
default:
throw
new RunnerException("Can't stop application.
Link for stop application is not available.");
}
}
try {
return HttpJsonHelper.request(ApplicationProcessDescriptor.class,
DtoFactory.getInstance().clone(link));
}
catch (IOException
e) {
throw
new RunnerException(e);
}
catch (ServerException | UnauthorizedException | ForbiddenException | ConflictException
e) {
throw
new RunnerException(e.getServiceError());
}
}
Is that a bug , or am I missing some thing ?
How can I stop a failed runner process .
Thanks.
Best Regards,
Dany Shapiro.
DI Cloud Exp DevX | SaaS Extensions & Ecosystem Team | SAP Labs Israel | 15 Hatidhar st. | Raanana 43665, Israel
T +972-(0)9-777-5201
