|
|
@@ -59,6 +59,16 @@ public class AppStatusServiceImpl implements AppStatusService {
|
|
|
remoteCall(machineId, rpcMsg);
|
|
|
}
|
|
|
|
|
|
+ @Override
|
|
|
+ public void getStatus(String appId, String machineId) {
|
|
|
+ AppConfig appConfig = appConfigQuery.findByAppId(appId);
|
|
|
+ String packType = appConfig.getPackerConfig().getType();
|
|
|
+ StatusParam statusParam = new StatusParam(packType, appId);
|
|
|
+ RpcMsg rpcMsg = RpcMsg.paramMsg(AppRpcClazz.class.getSimpleName(), AppRpcClazz.status.name(),
|
|
|
+ JsonConverter.objectToJson(statusParam));
|
|
|
+ remoteCall(machineId, rpcMsg);
|
|
|
+ }
|
|
|
+
|
|
|
private void remoteCall(String machineId, RpcMsg rpcMsg) {
|
|
|
Message message = Message.rpcParamMsg(rpcMsg);
|
|
|
// TODO 对于需要返回值的 pub,需要做一个记录,pub 和 sub 一一对应
|
|
|
@@ -69,14 +79,4 @@ public class AppStatusServiceImpl implements AppStatusService {
|
|
|
e.printStackTrace();
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
- @Override
|
|
|
- public void getStatus(String appId, String machineId) {
|
|
|
- AppConfig appConfig = appConfigQuery.findByAppId(appId);
|
|
|
- String packType = appConfig.getPackerConfig().getType();
|
|
|
- StatusParam statusParam = new StatusParam(packType, appId);
|
|
|
- RpcMsg rpcMsg = RpcMsg.paramMsg(AppRpcClazz.class.getSimpleName(), AppRpcClazz.status.name(),
|
|
|
- JsonConverter.objectToJson(statusParam));
|
|
|
- remoteCall(machineId, rpcMsg);
|
|
|
- }
|
|
|
}
|