Consistent max threads

This commit is contained in:
bashrc committed 2019-11-07 13:35:33 +00:00
1 parent f80fd83998
commit b167c5bae8
1 file changed
+4 -3
+4 -3
View File
@@ -1140,7 +1140,7 @@ def sendPost(projectVersion: str, \
postPath,httpPrefix,withDigest,postJsonStr)
# Keep the number of threads being used small
while len(sendThreads)>20:
while len(sendThreads)>1000:
print('WARN: Maximum threads reached - killing send thread')
sendThreads[0].kill()
sendThreads.pop(0)
@@ -1341,11 +1341,12 @@ def sendSignedJson(postJsonObject: {},session,baseDir: str, \
if ':' not in toDomain:
toDomain=toDomain+':'+str(toPort)
handleBase=httpPrefix+'://'+toDomain+'/@'
if toNickname:
handle=httpPrefix+'://'+toDomain+'/@'+toNickname
handle=handleBase+toNickname
else:
singleUserInstanceNickname='dev'
handle=httpPrefix+'://'+toDomain+'/@'+singleUserInstanceNickname
handle=handleBase+singleUserInstanceNickname
if debug:
print('DEBUG: handle - '+handle+' toPort '+str(toPort))