Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add --expect-workers-max-wait parameter #1922

Merged
merged 3 commits into from Nov 1, 2021

Conversation

cyberw
Copy link
Collaborator

@cyberw cyberw commented Nov 1, 2021

This is very useful in CI, where you dont want to wait forever if your workers fail to connect.

@cyberw cyberw merged commit f1168be into master Nov 1, 2021
@cyberw cyberw deleted the add-expect-workers-max-wait-parameter branch November 1, 2021 14:29
while len(runner.clients.ready) < options.expect_workers:
if options.expect_workers_max_wait and options.expect_workers_max_wait < time.monotonic() - start_time:
logger.error("Gave up waiting for workers to connect.")
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

could you add

if runner is not None:
    runner.quit()

here to remove all workers, if any?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sure

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

cyberw added a commit that referenced this pull request Nov 8, 2021
@hdzys
Copy link

hdzys commented Feb 11, 2022

This error occurred when I run this command:
“locust -f D:\ProgramFiles\cover_app_platform\app\file_upload\ios\20211020-192356\ios_jin_zhi_bo_jg.py --master --master-bind-port 9800 --headless -u 10 -r 2 --expect-worker 2 --expect-workers-max-wait 1 -t 10s -s 10 ”
locust: error: ambiguous option: --expect-worker could match --expect-workers, --expect-workers-max-wait

@cyberw
Copy link
Collaborator Author

cyberw commented Feb 11, 2022

Use --expect-workers not --expect-worker

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants