You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Sorry, I saw I was using the CRAN version and not the development version. When I updated the version, the async parameter is available.
However, I find myself with the need to refactor my code to use mirai promises instead and I don't see . See why here in my code (Furthermore I wish I know how to use S7 generics with mirai).
Yeah, I should probably add that. FWIW your own issue is that you define an S7 class with specific types for its slots and then use the query params without casting them into the correct type.
even in the case of non programmatic api usage can allow one to bypass the error of "request and response cannot be used in async endpoints" and get "async" endpoints that manipulate or check headers for auth/etc before passing computation to say mirai daemons
and thanks @jrosell for the mirai::everywhere example, i had exactly a duckdb application using this at api setup !
Activity
thomasp85 commentedon Sep 19, 2025
Can you point me to where you are finding it unclear?
async = TRUEis certainly the way to do it.jrosell commentedon Sep 19, 2025
Sorry, I saw I was using the CRAN version and not the development version. When I updated the version, the async parameter is available.
However, I find myself with the need to refactor my code to use mirai promises instead and I don't see . See why here in my code (Furthermore I wish I know how to use S7 generics with mirai).
Edit: I made a gist, and added SQLite too https://gist.github.com/jrosell/e4820231d3c234b2c9cd02bf41f17af1
thomasp85 commentedon Oct 6, 2025
What is the exact question, if any, now?
jrosell commentedon Oct 6, 2025
Sorry for not being clear.
I think that the docs should include some mirai({... }) example when not using async=TRUE parameter.
thomasp85 commentedon Oct 20, 2025
Yeah, I should probably add that. FWIW your own issue is that you define an S7 class with specific types for its slots and then use the query params without casting them into the correct type.
jrosell commentedon Oct 20, 2025
Thanks. About my code: The error is intended. I want S7 type check fail when types are not ok.
sounkou-bioinfo commentedon Jan 26, 2026
Adding my two cents here. Manually returning a
mirai({...}) |> as.promise()even in the case of non programmatic api usage can allow one to bypass the error of "request and response cannot be used in async endpoints" and get "async" endpoints that manipulate or check headers for auth/etc before passing computation to say mirai daemons
and thanks @jrosell for the mirai::everywhere example, i had exactly a duckdb application using this at api setup !