Commit 993c2431 by huangfusuper

删除对应的redis

parent 9275b0f0
......@@ -8,6 +8,7 @@ import com.byit.dto.common.CallbackDto;
import com.byit.dto.executor.RunParamWrapped;
import com.byit.dto.executor.ScriptParamAndPlaceholderDto;
import com.byit.dto.plugin.FlowExtendedConfiguration;
import com.byit.dto.web.ReturnResult;
import com.byit.enums.CallMethodEnum;
import com.byit.model.JobTask;
import com.byit.model.RunRecording;
......@@ -70,7 +71,8 @@ public class RpcCallbackInstanceRunTheLifeCycleCallback implements InstanceRunTh
PluginRpcRequestPacket param = buildPluginRpcRequestPacket(runRecording,callbackDto,rpcServerKey);
PluginRpcResponsePacket call = taskServer.call(param);
Object result = call.getResult();
ScriptParamAndPlaceholderDto rpcScriptParamAndPlaceholderDto = (ScriptParamAndPlaceholderDto) result;
ReturnResult<String> returnResult = (ReturnResult<String>) result;
ScriptParamAndPlaceholderDto rpcScriptParamAndPlaceholderDto = JSON.parseObject(returnResult.getContent(), ScriptParamAndPlaceholderDto.class);
//放置到对应的redis里面
stringRedisTemplate.opsForValue().set(String.format(EXTENDED_PARAMS_S,runRecording.getRunId()),JSON.toJSONString(rpcScriptParamAndPlaceholderDto));
if (rpcScriptParamAndPlaceholderDto != null) {
......@@ -190,7 +192,14 @@ public class RpcCallbackInstanceRunTheLifeCycleCallback implements InstanceRunTh
CallbackDto callbackDto = new CallbackDto();
callbackDto.setData(extendedParam);
PluginRpcRequestPacket rpcRequestPacket = buildPluginRpcRequestPacket(runRecording, callbackDto, rpcEndServerKey);
PluginRpcResponsePacket call = taskServer.call(rpcRequestPacket);
log.info("回调{}通讯成功!",call);
try {
PluginRpcResponsePacket call = taskServer.call(rpcRequestPacket);
log.info("回调{}通讯成功!",call);
}catch (Exception e) {
log.info("回调通讯失败!");
}finally {
stringRedisTemplate.delete(String.format(EXTENDED_PARAMS_S, runRecording.getRunId()));
}
}
}
......@@ -153,7 +153,6 @@ public class NettyPluginServerHandler extends SimpleChannelInboundHandler<Plugin
transferPluginRpcResponse.setStatus(true);
transferPluginRpcResponse.setCode("00000000");
transferPluginRpcResponse.setMsg("调用成功");
transferPluginRpcResponse.setExtension(msg.getExtension());
transferPluginRpcResponse.setType(ResponseTyEnum.TRANSFER.getType());
ctx.channel().writeAndFlush(transferPluginRpcResponse);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment