Revert "PCM: update live list in background."

This reverts commit 3acdb44a98.
remotes/1693176582716663532/tmp_refs/heads/watchparty
Snakes 2022-09-23 15:41:04 -04:00
parent e720941c91
commit 1cf5ec9e0d
2 changed files with 4 additions and 5 deletions

View File

@ -32,7 +32,8 @@ def cron(every_5m, every_1h, every_1d, every_1mo):
spin_roulette_wheel()
offsitementions.offsite_mentions_task()
if SITE_NAME == 'PCM':
route_static.live_cached(force=True)
cache.delete_memoized(route_static.live_cached)
route_static.live_cached()
if every_1h:
awards.award_timers_bots_task()

View File

@ -443,10 +443,8 @@ if SITE == 'pcmemes.net':
live_thumb_regex = re.compile('\{"thumbnail":\{"thumbnails":\[\{"url":"(.*?)"', flags=re.A)
offline_regex = re.compile('","title":"(.*?)".*?"width":48,"height":48\},\{"url":"(.*?)"', flags=re.A)
@cache.memoize(timeout=86400,
forced_update=(lambda force=False: force),
args_to_ignore=["force"])
def live_cached(force=False):
@cache.memoize(timeout=86400)
def live_cached():
live = []
offline = []
db = db_session()