donate-cpu: only retry uploading package if it did not work
This commit is contained in:
parent
dd94bfede9
commit
15d0aa503b
|
@ -259,11 +259,12 @@ def uploadResults(package, results):
|
||||||
sock.connect(server_address)
|
sock.connect(server_address)
|
||||||
sendAll(sock, 'write\n' + package + '\n' + results + '\nDONE')
|
sendAll(sock, 'write\n' + package + '\n' + results + '\nDONE')
|
||||||
sock.close()
|
sock.close()
|
||||||
|
return True
|
||||||
except socket.error:
|
except socket.error:
|
||||||
print('Upload failed, retry in 60 seconds')
|
print('Upload failed, retry in 60 seconds')
|
||||||
time.sleep(30)
|
time.sleep(30)
|
||||||
pass
|
pass
|
||||||
return package
|
return False
|
||||||
|
|
||||||
jobs = '-j1'
|
jobs = '-j1'
|
||||||
stopTime = None
|
stopTime = None
|
||||||
|
|
Loading…
Reference in New Issue