Skip to content

Commit

Permalink
ignore the update in graph
Browse files Browse the repository at this point in the history
  • Loading branch information
liberhe committed Jan 22, 2024
1 parent 5291d38 commit 988c7d6
Showing 1 changed file with 7 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -63,11 +63,13 @@ public void updateRedpacketStatus() throws IOException {
JsonArray redpacketsArray = data.getAsJsonArray("redpackets");
JsonArray lastupdatesArray = data.getAsJsonArray("lastupdates");
String lastTimestampFromGraph = lastupdatesArray.get(0).getAsJsonObject().get("lastupdateTimestamp").getAsString();
if(Objects.equals(lastTimestampFromGraph, lastUpdateTimestamp)){
return;
} else {
lastUpdateTimestamp = lastTimestampFromGraph;
}

// open in prod
// if(Objects.equals(lastTimestampFromGraph, lastUpdateTimestamp)){
// return;
// } else {
// lastUpdateTimestamp = lastTimestampFromGraph;
// }


List<RedPacket> redPacketList = redPacketRepository.findUnfinishedRedpacketByChainId(chainId);
Expand All @@ -77,7 +79,6 @@ public void updateRedpacketStatus() throws IOException {
JsonObject redpacketObject = redpacketsArray.get(i).getAsJsonObject();

Long id = redpacketObject.get("nonce").getAsLong();
// String name = redpacketObject.get("name").getAsString();
for (int j = 0; j < redPacketList.size(); j++) {
RedPacket redPacket = redPacketList.get(j);

Expand Down

0 comments on commit 988c7d6

Please sign in to comment.