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

Update for plumber v1+ #4

Open
siegerts opened this issue Jan 29, 2021 · 1 comment
Open

Update for plumber v1+ #4

siegerts opened this issue Jan 29, 2021 · 1 comment

Comments

@siegerts
Copy link
Owner

The v1+ of plumber have numerous breaking changes that limit the current functionality of drip. Mainly, the application structure that utilizes and entrypoint.R file.

The run function needs to be refactored to account for the new ways of instantiating the API itself.

#2

@mskyttner
Copy link

It would be nice to be able to use drip with R packages that embed several plumber APIs. In recent versions of the R plumber packages, there is plumber::plumb_api and plumber::available_apis providing support for multiple APIs in one R package, which can ship multiple plumber routers, stored in the package directory inst, in various folders inside the subfolder plumber (./inst/plumber/API_1 is an example of such a dir which could have plumber.R and entrypoint.R for example).

This looks interesting: https://callr.r-lib.org/reference/rscript_process.html

Here is an attempt to work around the wrapping of the entrypoint and and use callr::rscript to launch the process:

https://github.com/mskyttner/plumber-dripdrop/ (see the entrypoint files in the dripdrop directory)

It seems to work but causes zombie R processes at reloads.

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

No branches or pull requests

2 participants