Skip to content

Made it possible to run multiple workerpools on the same machine - #11934

Merged
micheles merged 6 commits into
masterfrom
workerpool
Oct 19, 2026
Merged

micheles merged 6 commits into
masterfrom
workerpool

Conversation

@micheles

Copy link
Copy Markdown
Contributor

This is useful to test the zmq cluster locally

host_cores entries can now specify a port, as in "127.0.0.1:1910 4",
so that several workerpools can run on the same host. The port is
passed to the workerpool with the new --ctrl-port option and defaults
to ctrl_port. WorkerMaster.status() reports each pool as host:port.

WorkerMaster.stop() now waits for the local workerpools to exit after
sending the stop command, and terminates them only on timeout; killing
them immediately leaked the semaphores of their process pool.
Replace the test that needed a running task streamer with one that
starts two workerpools on localhost, checks their status, dispatches
tasks to both and checks that they exit on their own after stop.
@micheles micheles added this to the Engine 3.27.0 milestone Oct 19, 2026
@micheles
micheles requested a review from vot4anto October 19, 2026 04:59
@micheles micheles self-assigned this Oct 19, 2026
On Windows the Popen pid of a venv launcher differs from the process
running the workerpool, so the test compares against getpid instead.
Parse host_cores once and pass it to ssh_args, add a _running helper
for the repeated socket_ready/ctrl_url loops, and replace the bare
assert in the test teardown with an explicit AssertionError.
@micheles
micheles merged commit 0b6dda5 into master Oct 19, 2026
11 checks passed
@micheles
micheles deleted the workerpool branch October 19, 2026 05:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant