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
Somewhy the function never executes when the user is in queue and closes the browser window before the queue reaches to process his request.
Am I missing something or is this a bug? I need the visitor's request to be in queue even if he closes the browser window. I don't want unlimited concurrency, I need only one concurrent process. The function should eventually start when the queue reaches him (the function will send him an email notification) even if he has closed the browser window long ago.
I could not find any info on this from the documentation.
Thanks.
Have you searched existing issues? 🔎
I have searched and found no existing issues
Reproduction
importgradioasgr
Screenshot
No response
Logs
No response
System Info
yes
Severity
I can work around it
The text was updated successfully, but these errors were encountered:
Hi @peeter2 yes this is the intentional behavior. If a user uses your app through the Gradio queue, then they will automatically be removed if they close their browser window. This is to prevent the queue from exploding with very popular apps. What you could do potentially is to set queue=False for your event, in which case Gradio's queue is not used to manage your event, and your event is directly sent to FastAPI's API endpoint. In which case, concurrency is now controlled by FastAPI instead of Gradio. If you want to adjust the number of FastAPI threads, you can set the max_threads argument in launch()
Yes, thanks. Just not sure how to use max_threads argument because I am not using launch(), I have gradio app mounted within another fastapi app using gr.mount_gradio_app.
I think what you are looking for @peeter2 is an asynchronous task queue like rq (https://python-rq.org) or celery. You can integrate any one of these with gradio by simply adding the job to the queue from the python function. But don't think this is core gradio's responsibility.
Describe the bug
Somewhy the function never executes when the user is in queue and closes the browser window before the queue reaches to process his request.
Am I missing something or is this a bug? I need the visitor's request to be in queue even if he closes the browser window. I don't want unlimited concurrency, I need only one concurrent process. The function should eventually start when the queue reaches him (the function will send him an email notification) even if he has closed the browser window long ago.
I could not find any info on this from the documentation.
Thanks.
Have you searched existing issues? 🔎
Reproduction
Screenshot
No response
Logs
No response
System Info
Severity
I can work around it
The text was updated successfully, but these errors were encountered: