Accessing size of request queue in plumber

Is there any method to access the # of pending requests from a plumber endpoint, or from a hook?

I do not believe this can be done.

plumber returns a httpuv server. If the main R process is working on something, httpuv will not be notified of any pending requests while the main R process is working.

Thanks, that is what i was afraid of. What about in between, after it has processed one request and before it routes the next request?

When version 0.5.0 comes out, you might be able to things with async support...


  • request comes in
  • increment the counter
  • have the body of the long running function be computed using future
    • future will not access to the live counter, only the counter value it knows about at the start of execution.
  • In the pre-serializer step, decrement the counter

But for now, I do not see a way.

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.