mirror of https://gitlab.com/bashrc2/epicyon
Remove cached json for muted announce
parent
d3e341b594
commit
29ac6e95ff
29
blocking.py
29
blocking.py
|
@ -554,10 +554,16 @@ def mutePost(baseDir: str, nickname: str, domain: str, port: int,
|
||||||
if recentPostsCache['html'].get(postId):
|
if recentPostsCache['html'].get(postId):
|
||||||
del recentPostsCache['html'][postId]
|
del recentPostsCache['html'][postId]
|
||||||
print('MUTE: ' + postId + ' removed cached html')
|
print('MUTE: ' + postId + ' removed cached html')
|
||||||
if alsoUpdatePostId and recentPostsCache.get('html'):
|
|
||||||
if recentPostsCache['html'].get(alsoUpdatePostId):
|
if alsoUpdatePostId:
|
||||||
del recentPostsCache['html'][alsoUpdatePostId]
|
if recentPostsCache.get('json'):
|
||||||
print('MUTE: ' + alsoUpdatePostId + ' removed referenced html')
|
if recentPostsCache['json'].get(alsoUpdatePostId):
|
||||||
|
del recentPostsCache['json'][alsoUpdatePostId]
|
||||||
|
print('MUTE: ' + alsoUpdatePostId + ' removed referenced json')
|
||||||
|
if recentPostsCache.get('html'):
|
||||||
|
if recentPostsCache['html'].get(alsoUpdatePostId):
|
||||||
|
del recentPostsCache['html'][alsoUpdatePostId]
|
||||||
|
print('MUTE: ' + alsoUpdatePostId + ' removed referenced html')
|
||||||
|
|
||||||
|
|
||||||
def unmutePost(baseDir: str, nickname: str, domain: str, port: int,
|
def unmutePost(baseDir: str, nickname: str, domain: str, port: int,
|
||||||
|
@ -642,10 +648,17 @@ def unmutePost(baseDir: str, nickname: str, domain: str, port: int,
|
||||||
if recentPostsCache['html'].get(postId):
|
if recentPostsCache['html'].get(postId):
|
||||||
del recentPostsCache['html'][postId]
|
del recentPostsCache['html'][postId]
|
||||||
print('UNMUTE: ' + postId + ' removed cached html')
|
print('UNMUTE: ' + postId + ' removed cached html')
|
||||||
if alsoUpdatePostId and recentPostsCache.get('html'):
|
if alsoUpdatePostId:
|
||||||
if recentPostsCache['html'].get(alsoUpdatePostId):
|
if recentPostsCache.get('json'):
|
||||||
del recentPostsCache['html'][alsoUpdatePostId]
|
if recentPostsCache['json'].get(alsoUpdatePostId):
|
||||||
print('MUTE: ' + alsoUpdatePostId + ' removed referenced html')
|
del recentPostsCache['json'][alsoUpdatePostId]
|
||||||
|
print('UNMUTE: ' +
|
||||||
|
alsoUpdatePostId + ' removed referenced json')
|
||||||
|
if recentPostsCache.get('html'):
|
||||||
|
if recentPostsCache['html'].get(alsoUpdatePostId):
|
||||||
|
del recentPostsCache['html'][alsoUpdatePostId]
|
||||||
|
print('UNMUTE: ' +
|
||||||
|
alsoUpdatePostId + ' removed referenced html')
|
||||||
|
|
||||||
|
|
||||||
def outboxMute(baseDir: str, httpPrefix: str,
|
def outboxMute(baseDir: str, httpPrefix: str,
|
||||||
|
|
Loading…
Reference in New Issue