-
-
Notifications
You must be signed in to change notification settings - Fork 295
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
Easy way to start server and worker at once in non-blocking fashion (and/or docs to make this behavior clear) #407
Comments
to use same-process and async you also need to go to if you feel like improving the docs we'll be happy to accept a PR 👍 |
Is there a way to specify the number of workers btw? |
Unlike Ruby and rails background jobs here it’s (mostly) not needed because we have real threads and even more than that real async. For the async mode the pool is managed by Tokio |
Ok that's super cool. I added a PR adding the config description to the docs. |
#412 - merged |
Description
Right now the default
cargo loco start
behavior starts just the server. Starting both server and worker withcargo loco start -s
starts the server and the worker in such a way that worker jobs block the server. It would be preferable to have a convenient server starting command that had the worker spun up in a separate process.Additionally it is not clear from the docs that you need to specifically start a separate worker especially for local development.
To Reproduce
Use either
cargo loco start -s
and get blocking worker behavior orcargo loco start
and get no worker behavior.Expected Behavior
A preferable behavior would be a command that behaves in the same way as
cargo loco start & cargo loco start -w &
which will interleave the two processes outputs and both will exit onctl+c
.Environment:
Local
Additional Context
I'm happy to pitch in some effort on the docs. I started looking into how the start commands were generated but I haven't figured out how to adjust the start command or add a new one yet.
The text was updated successfully, but these errors were encountered: