-
Notifications
You must be signed in to change notification settings - Fork 255
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
let a few services continuously running (daemon) using plumber. #23
Comments
Thanks for opening this. This is something I'm actively thinking about. I don't think the solution belongs in plumber, since R's forte is not load balancing and managing processes, but I have a poked around at a couple of other tools that can be used to accomplish at least some of these purposes. I'll get them written up shortly. |
Touches #23. Create empty path-to-port article.
I've started writing this up here: http://plumber.trestletech.com/docs/hosting/ |
You can set the port as a command line argument to your bash script: #!/bin/bash
port=${1:-9002}
kill $(ps aux | grep "$port" | grep plumb | awk '{print $2}')
R --vanilla -e "library(plumber); pr <- plumb('query.api.r'); pr\$run(port=$port)"
EDIT. Going through the documentation I realized that any of my solution is original. Removed most of the parts from the official documentation. |
Between the above link and http://plumber.trestletech.com/docs/docker/, I'm calling this closed. |
What would be the recommended way to create a daemon using plumber ?
issues
Issue is what if I press this twice, and there are two conflicting scripts running on the same port.
What is someone else does the same.
Possible to check all plumber services running (given a port)?
The text was updated successfully, but these errors were encountered: