From 4bea7f3fd2d5be14c06c30111d4928ab8b33cefd Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Mon, 25 Nov 2019 22:37:20 +0000 Subject: [PATCH] Pass recent posts cache --- inbox.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/inbox.py b/inbox.py index e64b42bab..4bcfd1af8 100644 --- a/inbox.py +++ b/inbox.py @@ -739,7 +739,7 @@ def personReceiveUpdate(baseDir: str, \ os.remove(avatarFilename) return True -def receiveUpdate(session,baseDir: str, \ +def receiveUpdate(recentPostsCache: {},session,baseDir: str, \ httpPrefix: str,domain :str,port: int, \ sendThreads: [],postLog: [],cachedWebfingers: {}, \ personCache: {},messageJson: {},federationList: [], \ @@ -780,7 +780,7 @@ def receiveUpdate(session,baseDir: str, \ if os.path.isfile(cachedPostFilename): os.remove(cachedPostFilename) # remove from memory cache - removePostFromCache(messageJson,self.server.recentPostsCache) + removePostFromCache(messageJson,recentPostsCache) if debug: print('DEBUG: Question update was received') return True @@ -2129,7 +2129,7 @@ def runInboxQueue(recentPostsCache: {},maxRecentPosts: int, \ queue.pop(0) continue - if receiveUpdate(session, \ + if receiveUpdate(recentPostsCache,session, \ baseDir,httpPrefix, \ domain,port, \ sendThreads,postLog, \