forked from indymedia/epicyon
Rename function
parent
f7ccde8606
commit
c135486059
|
@ -106,23 +106,23 @@ def saveIndividualPostAsHtmlToCache(baseDir: str,
|
||||||
return False
|
return False
|
||||||
|
|
||||||
|
|
||||||
def getPostFromRecent(session,
|
def getPostFromRecentCache(session,
|
||||||
baseDir: str,
|
baseDir: str,
|
||||||
httpPrefix: str,
|
httpPrefix: str,
|
||||||
nickname: str, domain: str,
|
nickname: str, domain: str,
|
||||||
postJsonObject: {},
|
postJsonObject: {},
|
||||||
postActor: str,
|
postActor: str,
|
||||||
personCache: {},
|
personCache: {},
|
||||||
allowDownloads: bool,
|
allowDownloads: bool,
|
||||||
showPublicOnly: bool,
|
showPublicOnly: bool,
|
||||||
storeToCache: bool,
|
storeToCache: bool,
|
||||||
boxName: str,
|
boxName: str,
|
||||||
avatarUrl: str,
|
avatarUrl: str,
|
||||||
enableTimingLog: bool,
|
enableTimingLog: bool,
|
||||||
postStartTime,
|
postStartTime,
|
||||||
pageNumber: int,
|
pageNumber: int,
|
||||||
recentPostsCache: {},
|
recentPostsCache: {},
|
||||||
maxRecentPosts: int) -> str:
|
maxRecentPosts: int) -> str:
|
||||||
"""Attempts to get the html post from the recent posts cache in memory
|
"""Attempts to get the html post from the recent posts cache in memory
|
||||||
"""
|
"""
|
||||||
if boxName == 'tlmedia':
|
if boxName == 'tlmedia':
|
||||||
|
@ -1022,21 +1022,21 @@ def individualPostAsHtml(allowDownloads: bool,
|
||||||
|
|
||||||
# get the html post from the recent posts cache if it exists there
|
# get the html post from the recent posts cache if it exists there
|
||||||
postHtml = \
|
postHtml = \
|
||||||
getPostFromRecent(session, baseDir,
|
getPostFromRecentCache(session, baseDir,
|
||||||
httpPrefix, nickname, domain,
|
httpPrefix, nickname, domain,
|
||||||
postJsonObject,
|
postJsonObject,
|
||||||
postActor,
|
postActor,
|
||||||
personCache,
|
personCache,
|
||||||
allowDownloads,
|
allowDownloads,
|
||||||
showPublicOnly,
|
showPublicOnly,
|
||||||
storeToCache,
|
storeToCache,
|
||||||
boxName,
|
boxName,
|
||||||
avatarUrl,
|
avatarUrl,
|
||||||
enableTimingLog,
|
enableTimingLog,
|
||||||
postStartTime,
|
postStartTime,
|
||||||
pageNumber,
|
pageNumber,
|
||||||
recentPostsCache,
|
recentPostsCache,
|
||||||
maxRecentPosts)
|
maxRecentPosts)
|
||||||
if postHtml:
|
if postHtml:
|
||||||
return postHtml
|
return postHtml
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue