Commit 993c2431 by huangfusuper

删除对应的redis

parent 9275b0f0
...@@ -8,6 +8,7 @@ import com.byit.dto.common.CallbackDto; ...@@ -8,6 +8,7 @@ import com.byit.dto.common.CallbackDto;
import com.byit.dto.executor.RunParamWrapped; import com.byit.dto.executor.RunParamWrapped;
import com.byit.dto.executor.ScriptParamAndPlaceholderDto; import com.byit.dto.executor.ScriptParamAndPlaceholderDto;
import com.byit.dto.plugin.FlowExtendedConfiguration; import com.byit.dto.plugin.FlowExtendedConfiguration;
import com.byit.dto.web.ReturnResult;
import com.byit.enums.CallMethodEnum; import com.byit.enums.CallMethodEnum;
import com.byit.model.JobTask; import com.byit.model.JobTask;
import com.byit.model.RunRecording; import com.byit.model.RunRecording;
...@@ -70,7 +71,8 @@ public class RpcCallbackInstanceRunTheLifeCycleCallback implements InstanceRunTh ...@@ -70,7 +71,8 @@ public class RpcCallbackInstanceRunTheLifeCycleCallback implements InstanceRunTh
PluginRpcRequestPacket param = buildPluginRpcRequestPacket(runRecording,callbackDto,rpcServerKey); PluginRpcRequestPacket param = buildPluginRpcRequestPacket(runRecording,callbackDto,rpcServerKey);
PluginRpcResponsePacket call = taskServer.call(param); PluginRpcResponsePacket call = taskServer.call(param);
Object result = call.getResult(); Object result = call.getResult();
ScriptParamAndPlaceholderDto rpcScriptParamAndPlaceholderDto = (ScriptParamAndPlaceholderDto) result; ReturnResult<String> returnResult = (ReturnResult<String>) result;
ScriptParamAndPlaceholderDto rpcScriptParamAndPlaceholderDto = JSON.parseObject(returnResult.getContent(), ScriptParamAndPlaceholderDto.class);
//放置到对应的redis里面 //放置到对应的redis里面
stringRedisTemplate.opsForValue().set(String.format(EXTENDED_PARAMS_S,runRecording.getRunId()),JSON.toJSONString(rpcScriptParamAndPlaceholderDto)); stringRedisTemplate.opsForValue().set(String.format(EXTENDED_PARAMS_S,runRecording.getRunId()),JSON.toJSONString(rpcScriptParamAndPlaceholderDto));
if (rpcScriptParamAndPlaceholderDto != null) { if (rpcScriptParamAndPlaceholderDto != null) {
...@@ -190,7 +192,14 @@ public class RpcCallbackInstanceRunTheLifeCycleCallback implements InstanceRunTh ...@@ -190,7 +192,14 @@ public class RpcCallbackInstanceRunTheLifeCycleCallback implements InstanceRunTh
CallbackDto callbackDto = new CallbackDto(); CallbackDto callbackDto = new CallbackDto();
callbackDto.setData(extendedParam); callbackDto.setData(extendedParam);
PluginRpcRequestPacket rpcRequestPacket = buildPluginRpcRequestPacket(runRecording, callbackDto, rpcEndServerKey); PluginRpcRequestPacket rpcRequestPacket = buildPluginRpcRequestPacket(runRecording, callbackDto, rpcEndServerKey);
PluginRpcResponsePacket call = taskServer.call(rpcRequestPacket); try {
log.info("回调{}通讯成功!",call); 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 ...@@ -153,7 +153,6 @@ public class NettyPluginServerHandler extends SimpleChannelInboundHandler<Plugin
transferPluginRpcResponse.setStatus(true); transferPluginRpcResponse.setStatus(true);
transferPluginRpcResponse.setCode("00000000"); transferPluginRpcResponse.setCode("00000000");
transferPluginRpcResponse.setMsg("调用成功"); transferPluginRpcResponse.setMsg("调用成功");
transferPluginRpcResponse.setExtension(msg.getExtension());
transferPluginRpcResponse.setType(ResponseTyEnum.TRANSFER.getType()); transferPluginRpcResponse.setType(ResponseTyEnum.TRANSFER.getType());
ctx.channel().writeAndFlush(transferPluginRpcResponse); 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