Skip to content

Commit

Permalink
userclass-picker: Preventing disabling number of users & spawn rate f…
Browse files Browse the repository at this point in the history
…ields when userclass picker is active
  • Loading branch information
mikenester committed Aug 7, 2022
1 parent 261decc commit 89ffc60
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion locust/web.py
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,9 @@ def swarm() -> Response:
else:
self._update_shape_class(form_data_shape_class_name)

print("\nshape class", self.environment.shape_class)
print("user_classes", self.environment.user_classes)

# Stopping Runners and setting user dispatchers to None so that they
# are recreated with the appropriate UserClasses
self._stop_runners()
Expand Down Expand Up @@ -526,7 +529,7 @@ def update_template_args(self):
"num_users": options and options.num_users,
"spawn_rate": options and options.spawn_rate,
"worker_count": worker_count,
"is_shape": self.environment.shape_class,
"is_shape": self.environment.shape_class and not self.userclass_picker_is_active,
"stats_history_enabled": options and options.stats_history_enabled,
"tasks": dumps({}),
"extra_options": extra_options,
Expand Down

0 comments on commit 89ffc60

Please sign in to comment.