Skip to content

Async with Shiny - the app golem namespace and future_promise #749

Answered by yogat3ch
yogat3ch asked this question in Q&A
Discussion options

You must be logged in to vote

Hi Colin,
This proved to be a much trickier task than anticipated, and after numerous attempts we finally got it to work. This might be something worth adding to the Optimizing {shiny} documentation as I feel like there's definitely others that probably get tripped up on a similar use case.

For context, we have an R6 class that handles the database connection and all the methods that use the database. We're trying to offload these db queries to future.

This was complicated by the fact that the function we needed in the future background process was a function defined in the golem app namespace and that instantiates a database connection (it will go stale if passed between environments).
T…

Replies: 3 comments 7 replies

Comment options

You must be logged in to vote
1 reply
@yogat3ch
Comment options

Comment options

You must be logged in to vote
3 replies
@yogat3ch
Comment options

@ColinFay
Comment options

@yogat3ch
Comment options

Answer selected by yogat3ch
Comment options

You must be logged in to vote
3 replies
@ColinFay
Comment options

@yogat3ch
Comment options

@yogat3ch
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #748 on October 04, 2021 20:01.