Async download queue?
-
Just had a question about how Async requests work. Does it just call the report immediately for every request? Or if there are a certain number of reports already running is there a queue that they are put into?
-
Does it just call the report immediately for every request?
Yes, it runs immediately.
We will try to add a new config option as a part of the next release. Thank you for the suggestion.
https://github.com/jsreport/jsreport/issues/742
-
@jan_blaha Thanks for adding the queueing for Async reports.
However, currently if you make an async request and all the workers are being used the request doesn't respond until a worker becomes available.
Is there a way for us to get the report to queue but respond right away rather than waiting for a worker to become available?
We have some large reports and if one of our servers gets bogged down with large reports there is a possibility of waiting 10-15min for a response from an async request.
I wasn't able to find any configuration that might help with this besides just setting the numberOfWorkers higher than I would like to.
-
Yes, that is the drawback.
I've proposed a solution in the backlog here
https://github.com/jsreport/jsreport/issues/1138We can add it to the next release I guess.
-
The solution is now part of the jsreport 4.5.0
https://jsreport.net/learn/reports#async