wlandau / crew

A distributed worker launcher
https://wlandau.github.io/crew/
Other
123 stars 4 forks source link

Update shiny.Rmd #70

Closed shikokuchuo closed 1 year ago

shikokuchuo commented 1 year ago

Prework

Related GitHub issues and pull requests

Summary

For efficiency, only poll when there are outstanding tasks. There are many ways to implement so feel free to modify / take what you want.

wlandau commented 1 year ago

Thanks for the suggestion! I took your idea of a reactive and used it to really simplify the concept in 9d73a762bc3f91f1dff153503f22baf9b02908c8 (and added a news entry with an acknowledgement in 65515d7a7a784072712515f4c9eb19c324c1f4d7). Now, the last observe() really drives the concept home, and I like the whole app much more. So although I have decided not to merge the literal PR, it was still super helpful.

shikokuchuo commented 1 year ago

Looks good! But somehow there is now a mismatch between the written description and the code in terms of invalidateLater(millis = 1000). I'd suggest to keep it at 250 to be more responsive.

wlandau commented 1 year ago

Thanks for catching that, it was left over from my testing code. Should be fixed now.

shikokuchuo commented 1 year ago

Almost there - the code block at the end hasn't caught up with the changes you made to the code above (which I really like)!

wlandau commented 1 year ago

Thanks for looking. Would you point me to where you still see millis = 1000? It took a couple commits, but I thought I got them.

shikokuchuo commented 1 year ago

That part’s good. It’s the moving the reactive_poll() statement to the end of the observe block, which I thought was a good call.

wlandau commented 1 year ago

Ah, thanks for clarifying. Should be fixed now.