mirror of
https://github.com/langflow-ai/langflow.git
synced 2026-07-24 06:10:49 +08:00
test(background): fix locust quitting handler signature so job accounting prints
The events.quitting listener took _environment as a required positional arg, but locust passes environment as a keyword, so the handler raised TypeError at shutdown and the submitted/completed summary never printed (locust exited 2). Accept the event kwargs via **_kwargs.
This commit is contained in:
@ -148,7 +148,7 @@ class BackgroundWorkflowUser(FastHttpUser):
|
||||
|
||||
|
||||
@events.quitting.add_listener
|
||||
def _print_counts(_environment, **_kwargs) -> None:
|
||||
def _print_counts(**_kwargs) -> None:
|
||||
with _lock:
|
||||
snap = dict(COUNTS)
|
||||
total = snap["submitted"] or 1
|
||||
|
||||
Reference in New Issue
Block a user