Merge pull request #1314 from bradmann/dev

Increase shutil copy buffer length to improve network performance
This commit is contained in:
Clinton Hall 2017-12-02 07:23:57 +13:00 committed by GitHub
commit 9bd61af1bf
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -27,6 +27,11 @@ from core import logger, nzbToMediaDB
requests.packages.urllib3.disable_warnings()
# Monkey Patch shutil.copyfileobj() to adjust the buffer length to 512KB rather than 4KB
shutil.copyfileobjOrig = shutil.copyfileobj
def copyfileobjFast(fsrc, fdst, length=512*1024):
shutil.copyfileobjOrig(fsrc, fdst, length=length)
shutil.copyfileobj = copyfileobjFast
def reportNzb(failure_link, clientAgent):
# Contact indexer site