mirror of https://gitlab.com/bashrc2/epicyon
Pass recent posts cache
parent
08811ffcf8
commit
4bea7f3fd2
6
inbox.py
6
inbox.py
|
@ -739,7 +739,7 @@ def personReceiveUpdate(baseDir: str, \
|
||||||
os.remove(avatarFilename)
|
os.remove(avatarFilename)
|
||||||
return True
|
return True
|
||||||
|
|
||||||
def receiveUpdate(session,baseDir: str, \
|
def receiveUpdate(recentPostsCache: {},session,baseDir: str, \
|
||||||
httpPrefix: str,domain :str,port: int, \
|
httpPrefix: str,domain :str,port: int, \
|
||||||
sendThreads: [],postLog: [],cachedWebfingers: {}, \
|
sendThreads: [],postLog: [],cachedWebfingers: {}, \
|
||||||
personCache: {},messageJson: {},federationList: [], \
|
personCache: {},messageJson: {},federationList: [], \
|
||||||
|
@ -780,7 +780,7 @@ def receiveUpdate(session,baseDir: str, \
|
||||||
if os.path.isfile(cachedPostFilename):
|
if os.path.isfile(cachedPostFilename):
|
||||||
os.remove(cachedPostFilename)
|
os.remove(cachedPostFilename)
|
||||||
# remove from memory cache
|
# remove from memory cache
|
||||||
removePostFromCache(messageJson,self.server.recentPostsCache)
|
removePostFromCache(messageJson,recentPostsCache)
|
||||||
if debug:
|
if debug:
|
||||||
print('DEBUG: Question update was received')
|
print('DEBUG: Question update was received')
|
||||||
return True
|
return True
|
||||||
|
@ -2129,7 +2129,7 @@ def runInboxQueue(recentPostsCache: {},maxRecentPosts: int, \
|
||||||
queue.pop(0)
|
queue.pop(0)
|
||||||
continue
|
continue
|
||||||
|
|
||||||
if receiveUpdate(session, \
|
if receiveUpdate(recentPostsCache,session, \
|
||||||
baseDir,httpPrefix, \
|
baseDir,httpPrefix, \
|
||||||
domain,port, \
|
domain,port, \
|
||||||
sendThreads,postLog, \
|
sendThreads,postLog, \
|
||||||
|
|
Loading…
Reference in New Issue