-
-
Notifications
You must be signed in to change notification settings - Fork 432
Waiting for all requests to finish before closing q. #690
Conversation
You're right, it does reintroduce those bugs. The problem is the fix for those bugs creates 404s in exports due to a race condition. Should we introduce rate limiting to mitigate the previous issues? |
…` option. Default is 8.
d3fc0c1 adds rate limiting based on the |
I took another look & realized I was missing a big part of the picture. Here's how I see the situation. This PR fixes #689 which is caused by The
Does this mean there's a bug with the queue? If so, then the bug with queue should be fixed, since the queue is needed to guarantee a concurrent request limit of |
@mrkishi To answer your question, this PR has no effect on #604 or #641. It only causes the export to wait for the requests to finish. The only way this would reintroduce #604 is if the The rate limiting is another concern from this issue, which is specifically for the exception. If we do need a way to rate limit, we could introduce a |
Hey, @btakita. It's not that I disagree that there's a problem, it's just that the root of the issue theoretically shouldn't be awaiting those promises, since I tried another fix that shouldn't ignore promises in case of timeouts at #698. Could you test that version to verify if it solves your problem? I don't have a codebase where #689 happens and I'm not sure what's required to create a test (if you do, we should add a test!). |
Err, I seem to have misunderstood everything. Indeed we should be waiting for all I force-pushed on that PR, could you check if it's a solution? |
I tested your branch along with the |
I agree that the queue should be used to manage all of the tasks, since it would consistently process the I'll update the |
Closing in favour of #698 — will cut a release soon |
Fixes issues/689
await Promise.all(promises)