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 functionality to run listener functions for custom_messages concurrently #2650

Merged

Conversation

samuelspagl
Copy link
Contributor

This MR adds the functionality to Runners.register_message to register a concurrent function.

Issue #2608 explains this PR in more detail.

@samuelspagl
Copy link
Contributor Author

Hi @cyberw,

I implemented a possible way to register concurrent custom_message functions.

I also thought about adding a new variable and function to the Runners class. The variable would store all of the concurrent running greenlets, and the function could join / or kill them.

What do you think about it?

@cyberw
Copy link
Collaborator

cyberw commented Mar 25, 2024

Looks nice! Just fix the linting and I'll merge!

@cyberw
Copy link
Collaborator

cyberw commented Mar 25, 2024

Oh yea, add something to the documentation as well (mainly examples/custom_messages.py, but mention it in running-distributed.rst as well)

@samuelspagl
Copy link
Contributor Author

@cyberw, pipeline seems to be fine. I added documentation and adjusted the example.

@cyberw
Copy link
Collaborator

cyberw commented Mar 25, 2024

Thanks! I'll make some small adjustments to the example, but no need to do it in this PR.

@cyberw cyberw merged commit 18b19e0 into locustio:master Mar 25, 2024
15 checks passed
@samuelspagl
Copy link
Contributor Author

Thanks a lot! Do you have a time estimate for the release? No pressure, just for my planning :)

@cyberw
Copy link
Collaborator

cyberw commented Mar 26, 2024

I dont have any release planned, but every merged pr becomes a prerelease. You can install it using pip install locust==2.24.2.dev8

@samuelspagl
Copy link
Contributor Author

Ah nice, didn't know that. Thanks a lot!

@cyberw
Copy link
Collaborator

cyberw commented Mar 26, 2024

I tried it out and tweaked the implementation a little. I hope this change doesnt break anything for you :) 061552f

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.

2 participants