[agent][init]- agent启动流程bug
This commit is contained in:
@@ -9,6 +9,7 @@ import io.wdd.common.beans.rabbitmq.OctopusMessage;
|
|||||||
import io.wdd.common.handler.MyRuntimeException;
|
import io.wdd.common.handler.MyRuntimeException;
|
||||||
import lombok.SneakyThrows;
|
import lombok.SneakyThrows;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.checkerframework.checker.units.qual.K;
|
||||||
import org.springframework.amqp.core.Message;
|
import org.springframework.amqp.core.Message;
|
||||||
import org.springframework.amqp.rabbit.annotation.*;
|
import org.springframework.amqp.rabbit.annotation.*;
|
||||||
import org.springframework.amqp.support.AmqpHeaders;
|
import org.springframework.amqp.support.AmqpHeaders;
|
||||||
@@ -79,7 +80,7 @@ public class OctopusAgentInitService {
|
|||||||
// consider the multi-agents register situation
|
// consider the multi-agents register situation
|
||||||
// judge the machineID begin
|
// judge the machineID begin
|
||||||
String[] split = octopusMessage.getUuid().split("-");
|
String[] split = octopusMessage.getUuid().split("-");
|
||||||
if (!agentServerInfo.getMachineId().startsWith(split[split.length - 1])) {
|
if (!agentServerInfo.getMachineId().startsWith(split[3])) {
|
||||||
String s = "INIT Message not for this agent !";
|
String s = "INIT Message not for this agent !";
|
||||||
log.error(s);
|
log.error(s);
|
||||||
throw new MyRuntimeException(s);
|
throw new MyRuntimeException(s);
|
||||||
@@ -90,7 +91,6 @@ public class OctopusAgentInitService {
|
|||||||
throw new MyRuntimeException(" Handle Octopus Message Error !");
|
throw new MyRuntimeException(" Handle Octopus Message Error !");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
|
|
||||||
// reject the message
|
// reject the message
|
||||||
|
|||||||
Reference in New Issue
Block a user