forked from indymedia/epicyon
Use loop
parent
e673770544
commit
4b68f1b437
2
posts.py
2
posts.py
|
@ -357,7 +357,7 @@ def sendPost(session,username: str, domain: str, toUsername: str, toDomain: str,
|
|||
signatureHeader['Content-type'] = 'application/json'
|
||||
|
||||
# Keep the number of threads being used small
|
||||
if len(sendThreads)>10:
|
||||
while len(sendThreads)>10:
|
||||
sendThreads[0].stop()
|
||||
sendThreads.pop(0)
|
||||
thr = threading.Thread(target=threadSendPost,args=(session,postJsonObject.copy(),federationList,inboxUrl,signatureHeader.copy()),daemon=True)
|
||||
|
|
Loading…
Reference in New Issue