improve scheduling

This commit is contained in:
ed 2022-11-04 20:28:05 +00:00
parent 357e7333cc
commit 2170ee8da4

View file

@ -3,7 +3,7 @@ from __future__ import print_function, unicode_literals
""" """
up2k.py: upload to copyparty up2k.py: upload to copyparty
2022-10-30, v0.20, ed <irc.rizon.net>, MIT-Licensed 2022-11-04, v0.21, ed <irc.rizon.net>, MIT-Licensed
https://github.com/9001/copyparty/blob/hovudstraum/bin/up2k.py https://github.com/9001/copyparty/blob/hovudstraum/bin/up2k.py
- dependencies: requests - dependencies: requests
@ -782,15 +782,17 @@ class Ctl(object):
while True: while True:
with self.mutex: with self.mutex:
if ( if (
self.hash_b - self.up_b < 1024 * 1024 * 128 self.hash_f - self.up_f == 1
and self.hash_c - self.up_c < 64 or (
and ( self.hash_b - self.up_b < 1024 * 1024 * 1024
not self.ar.nh and self.hash_c - self.up_c < 512
or ( )
self.q_upload.empty() ) and (
and self.q_handshake.empty() not self.ar.nh
and not self.uploader_busy or (
) self.q_upload.empty()
and self.q_handshake.empty()
and not self.uploader_busy
) )
): ):
break break