Skip to content

Commit

Permalink
[grid] Remove redundant listeners in Grid Model. (#9310)
Browse files Browse the repository at this point in the history
* [grid] Remove redundant listeners in Grid Model.

* [grid] Remove unused imports

Co-authored-by: Diego Molina <[email protected]>
  • Loading branch information
pujagani and diemol authored Mar 23, 2021
1 parent 5004ca8 commit 056b281
Showing 1 changed file with 0 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,9 @@
import com.google.common.collect.ImmutableSet;
import org.openqa.selenium.events.EventBus;
import org.openqa.selenium.grid.data.Availability;
import org.openqa.selenium.grid.data.NodeDrainComplete;
import org.openqa.selenium.grid.data.NodeDrainStarted;
import org.openqa.selenium.grid.data.NodeId;
import org.openqa.selenium.grid.data.NodeRemovedEvent;
import org.openqa.selenium.grid.data.NodeStatus;
import org.openqa.selenium.grid.data.NodeStatusEvent;
import org.openqa.selenium.grid.data.Session;
import org.openqa.selenium.grid.data.SessionClosedEvent;
import org.openqa.selenium.grid.data.Slot;
Expand Down Expand Up @@ -63,10 +60,6 @@ public GridModel(EventBus events) {
this.events = Require.nonNull("Event bus", events);

this.events.addListener(NodeDrainStarted.listener(nodeId -> setAvailability(nodeId, DRAINING)));
this.events.addListener(NodeDrainComplete.listener(this::remove));
this.events.addListener(NodeRemovedEvent.listener(this::remove));
this.events.addListener(NodeStatusEvent.listener(this::refresh));

this.events.addListener(SessionClosedEvent.listener(this::release));
}

Expand Down

0 comments on commit 056b281

Please sign in to comment.