mirror of
https://github.com/clinton-hall/nzbToMedia.git
synced 2025-08-14 18:47:09 -07:00
Merge pull request #1314 from bradmann/dev
Increase shutil copy buffer length to improve network performance
This commit is contained in:
commit
9bd61af1bf
1 changed files with 5 additions and 0 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue