forked from indymedia/epicyon
Consistent max threads
parent
f80fd83998
commit
b167c5bae8
7
posts.py
7
posts.py
|
@ -1140,7 +1140,7 @@ def sendPost(projectVersion: str, \
|
||||||
postPath,httpPrefix,withDigest,postJsonStr)
|
postPath,httpPrefix,withDigest,postJsonStr)
|
||||||
|
|
||||||
# Keep the number of threads being used small
|
# Keep the number of threads being used small
|
||||||
while len(sendThreads)>20:
|
while len(sendThreads)>1000:
|
||||||
print('WARN: Maximum threads reached - killing send thread')
|
print('WARN: Maximum threads reached - killing send thread')
|
||||||
sendThreads[0].kill()
|
sendThreads[0].kill()
|
||||||
sendThreads.pop(0)
|
sendThreads.pop(0)
|
||||||
|
@ -1341,11 +1341,12 @@ def sendSignedJson(postJsonObject: {},session,baseDir: str, \
|
||||||
if ':' not in toDomain:
|
if ':' not in toDomain:
|
||||||
toDomain=toDomain+':'+str(toPort)
|
toDomain=toDomain+':'+str(toPort)
|
||||||
|
|
||||||
|
handleBase=httpPrefix+'://'+toDomain+'/@'
|
||||||
if toNickname:
|
if toNickname:
|
||||||
handle=httpPrefix+'://'+toDomain+'/@'+toNickname
|
handle=handleBase+toNickname
|
||||||
else:
|
else:
|
||||||
singleUserInstanceNickname='dev'
|
singleUserInstanceNickname='dev'
|
||||||
handle=httpPrefix+'://'+toDomain+'/@'+singleUserInstanceNickname
|
handle=handleBase+singleUserInstanceNickname
|
||||||
|
|
||||||
if debug:
|
if debug:
|
||||||
print('DEBUG: handle - '+handle+' toPort '+str(toPort))
|
print('DEBUG: handle - '+handle+' toPort '+str(toPort))
|
||||||
|
|
Loading…
Reference in New Issue