Skip to content

Commit

Permalink
small changes in runner.py
Browse files Browse the repository at this point in the history
  • Loading branch information
samuelspagl committed Sep 6, 2022
1 parent 2028b20 commit f5822f4
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions locust/runners.py
Original file line number Diff line number Diff line change
Expand Up @@ -479,7 +479,8 @@ def _start(self, user_count: int, spawn_rate: float, wait: bool = False, user_cl
:param wait: If True calls to this method will block until all users are spawned.
If False (the default), a greenlet that spawns the users will be
started and the call to this method will return immediately.
:param user_classes: The user classes to be dispatched
:param user_classes: The user classes to be dispatched, None indicates to use the classes the dispatcher was
invoked with.
"""
self.target_user_count = user_count

Expand All @@ -494,8 +495,6 @@ def _start(self, user_count: int, spawn_rate: float, wait: bool = False, user_cl
if wait and user_count - self.user_count > spawn_rate:
raise ValueError("wait is True but the amount of users to add is greater than the spawn rate")

# if user_classes is None:
# user_classes = self.user_classes

for user_class in self.user_classes:
if self.environment.host:
Expand Down Expand Up @@ -756,9 +755,6 @@ def start(
logger.warning("You can't start a distributed test before at least one worker processes has connected")
return

# if user_classes is None:
# user_classes = self.user_classes

for user_class in self.user_classes:
if self.environment.host:
user_class.host = self.environment.host
Expand Down

0 comments on commit f5822f4

Please sign in to comment.