forked from indymedia/epicyon
If there are only a few inbox posts addressed to followers then move them to the individual addresses dict
We can afford to do a few extra copies, but not hundreds or thousandsmaster
parent
3396cb7c19
commit
dec94017ef
13
inbox.py
13
inbox.py
|
@ -564,7 +564,18 @@ def runInboxQueue(baseDir: str,httpPrefix: str,sendThreads: [],postLog: [],cache
|
||||||
# get recipients list
|
# get recipients list
|
||||||
recipientsDict,recipientsDictFollowers= \
|
recipientsDict,recipientsDictFollowers= \
|
||||||
inboxPostRecipients(baseDir,queueJson['post'],httpPrefix,domain,port)
|
inboxPostRecipients(baseDir,queueJson['post'],httpPrefix,domain,port)
|
||||||
recipientsList=[recipientsDict,recipientsDictFollowers]
|
|
||||||
|
# if there are only a small number of followers then process them as if they
|
||||||
|
# were specifically addresses to particular accounts
|
||||||
|
noOfFollowItems=len(recipientsDictFollowers.items())
|
||||||
|
if noOfFollowItems>0:
|
||||||
|
if noOfFollowItems<5:
|
||||||
|
if debug:
|
||||||
|
print('DEBUG: moving '+str(noOfFollowItems)+' inbox posts addressed to followers')
|
||||||
|
for handle,postItem in recipientsDictFollowers.items():
|
||||||
|
recipientsDict['handle']=postItem
|
||||||
|
recipientsDictFollowers={}
|
||||||
|
recipientsList=[recipientsDict,recipientsDictFollowers]
|
||||||
|
|
||||||
if debug:
|
if debug:
|
||||||
print('*************************************')
|
print('*************************************')
|
||||||
|
|
Loading…
Reference in New Issue