Skip to content

Commit

Permalink
addressed a comment - only update sub account for now to avoid redund…
Browse files Browse the repository at this point in the history
…ant updates
  • Loading branch information
liyaqin1 committed Aug 21, 2023
1 parent 4ff172e commit 4d51680
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ public class PingHandler {
private static final Logger LOG = LoggerFactory.getLogger(PingHandler.class);
private static final PingResponseBean NOOP;
private static final Set<String> EMPTY_GROUPS;
private static final String PINTEREST_MAIN_AWS_ACCOUNT = "998131032990";
//private static final long AGENT_COUNT_CACHE_TTL = 5 * 1000;

static {
Expand Down Expand Up @@ -156,7 +157,7 @@ void updateHosts(String hostName, String hostIp, String hostId, Set<String> grou
}
}

if (groupsToAdd.size() > 0 || accountId != null && !accountId.equals(recordedAccountId)) {
if (groupsToAdd.size() > 0 || accountId != null && !accountId.equals(PINTEREST_MAIN_AWS_ACCOUNT) && !accountId.equals(recordedAccountId)) {
hostDAO.insertOrUpdate(hostName, hostIp, hostId, HostState.ACTIVE.toString(), groups, accountId);
}

Expand Down

0 comments on commit 4d51680

Please sign in to comment.