Skip to content
This repository has been archived by the owner on Dec 13, 2023. It is now read-only.

Commit

Permalink
remove previous index of event handlers by event if event handler's e…
Browse files Browse the repository at this point in the history
…vent gets updated
  • Loading branch information
wy-hua committed Nov 10, 2023
1 parent 8981878 commit 5620b3a
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,9 @@ public void updateEventHandler(EventHandler eventHandler) {
throw new NotFoundException(
"EventHandler with name %s not found!", eventHandler.getName());
}
if(!existing.getEvent().equals(eventHandler.getEvent())){
removeIndex(existing);
}
index(eventHandler);
jedisProxy.hset(nsKey(EVENT_HANDLERS), eventHandler.getName(), toJson(eventHandler));
recordRedisDaoRequests("updateEventHandler");
Expand Down

0 comments on commit 5620b3a

Please sign in to comment.