mirror of
https://github.com/discourse/discourse.git
synced 2025-02-21 17:06:26 +08:00

Previously we were opening the file handles, then putting them in a queue for upload. If that queue grows too large, we can hit a maximum open files limit. This commit opens the file handle 'just in time', so the maximum number of open handles is equal to the upload concurrency (20).