-
Notifications
You must be signed in to change notification settings - Fork 97
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Move check on zero workers from client constructor to
Start
This one's in pursuit of trying to solve #87, where it's difficult to inject a River client into a worker because trying to initialize a client with the workers bundle empty is an error, creating a chicken and egg problem. There's no real reason to disallow a zero worker bundle from the constructor, and in fact a lot of our tests already add additional workers after the client was originally initialized (although `newTestClient` injects a default worker, which is why there's no error). If it's a useful pattern for us, it's probably useful for other users too. Here, move the zero workers check from the constructor over to the `Start` function instead. While it seems okay to initialize a client without workers, starting it without any does seem like a potential problem that we'd want to keep an eye out for. Fixes #87.
- Loading branch information
Showing
2 changed files
with
19 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters