-
Notifications
You must be signed in to change notification settings - Fork 86
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
httpuv::service does not seem to be working #148
Comments
That's definitely not how That said, this is an interesting use case, and I think we can come up with a way to do what you're looking for using Shiny's new async features. Stay tuned... |
Thanks Winston. Shame - it was really useful to be able to monitor a reactive variable during a long process and then pause or break as appropriate. |
@harveyl888 I have a number of ways to solve this that we can talk about. It'd be helpful to know from you:
|
Hi Joe. Thanks in advance.
|
Here's a start: https://gist.github.com/jcheng5/1ff1efbc539542ecedde92f25458a872 We should be able to do much better than this (for example, automatically stopping if the Shiny session that started the task stops; and working with async) but hopefully this can get you unblocked for now. |
Thanks @jcheng5. I've taken the gist and found that you can run with reactiveValues if |
@harveyl888 Ah, I forgot to answer the reactiveValues part of your question. When running in the same process, you can totally do that, but keep in mind those values may change under you as the user continues to use the application. If you want to "snapshot" the reactiveValues at the start time of the operation, you can do that by reading the reactiveValues you want (with isolate) into temp variables. When running in a different process, the values won't change under you, but you may end up copying more data into the background process then you actually need to; again, the solution is to copy the values you want (with isolate) into temp variables, and those will be the only ones copied to the background process. |
I'm having some issues using httpuv::service as a way to monitor progress and interrupt execution of a shiny app using a button. It's worked in the past but now does not seem to be working, possibly due to an upgrade in shiny or httpuv.
By way of example I've found that the code at https://stackoverflow.com/questions/30587883/is-it-possible-to-stop-executing-of-r-code-inside-shiny-without-stopping-the-sh/34517844#34517844 works under some installations but not others. The app should be interrupted when the stop button is pressed.
The code works on an old server running shiny 0.12.2.9006 and httpuv 1.3.3
The code does not work under shiny 1.1.0 and httpuv 1.4.3
The text was updated successfully, but these errors were encountered: