parent
ea30141d14
commit
a5cd812519
|
@ -123,6 +123,24 @@ public class DefaultExecThread implements AtuExecThread{
|
|||
}
|
||||
}
|
||||
|
||||
private String stopRecord() {
|
||||
String filePath = null;
|
||||
//停止录屏
|
||||
boolean isSave = Integer.parseInt(task.getScreenRecordSet()) != 0;
|
||||
if (this.startRecordFlag && this.deviceConnection != null) {
|
||||
Map<String, Object> stopRequest = new HashMap<>();
|
||||
stopRequest.put("save",isSave);
|
||||
stopRequest.put("tenantId",task.getTenantId());
|
||||
stopRequest.put("taskId",task.getTaskId());
|
||||
try {
|
||||
filePath = this.deviceConnection.stopRecord(stopRequest);
|
||||
} catch (Exception e) {
|
||||
log.error("关闭录屏失败", e);
|
||||
}
|
||||
}
|
||||
return filePath;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void destroy(String taskId) {
|
||||
|
@ -175,7 +193,7 @@ public class DefaultExecThread implements AtuExecThread{
|
|||
private boolean sendCancelResult(String taskId) {
|
||||
try {
|
||||
log.debug("任务取消更新步骤结果。。。");
|
||||
ScriptStep step = (ScriptStep)this.scriptExecutor.getCurrentStep(); // // todo: 没有开始执行,导致取消任务时候空指针
|
||||
ScriptStep step = (ScriptStep)this.scriptExecutor.getCurrentStep(); // // 没有开始执行,导致取消任务时候空指针
|
||||
if (step == null) {
|
||||
try{
|
||||
Thread.sleep(500);
|
||||
|
@ -184,6 +202,8 @@ public class DefaultExecThread implements AtuExecThread{
|
|||
}
|
||||
step = (ScriptStep)this.scriptExecutor.getCurrentStep();
|
||||
}
|
||||
// 停止录屏请求
|
||||
stopRecord();
|
||||
StepExecuteResult stepResult = createStepResult(step, taskId);
|
||||
updateTaskResult(stepResult);
|
||||
|
||||
|
|
Loading…
Reference in New Issue