From b167c5bae8eafa8763301f0ff6d3ffa36060ad2f Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Thu, 7 Nov 2019 13:35:33 +0000 Subject: [PATCH] Consistent max threads --- posts.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/posts.py b/posts.py index cf098380..62dd0444 100644 --- a/posts.py +++ b/posts.py @@ -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))