PCM: update live list in background.
parent
af2235dc8e
commit
3acdb44a98
|
@ -32,8 +32,7 @@ def cron(every_5m, every_1h, every_1d, every_1mo):
|
|||
spin_roulette_wheel()
|
||||
offsitementions.offsite_mentions_task()
|
||||
if SITE_NAME == 'PCM':
|
||||
cache.delete_memoized(route_static.live_cached)
|
||||
route_static.live_cached()
|
||||
route_static.live_cached(force=True)
|
||||
|
||||
if every_1h:
|
||||
awards.award_timers_bots_task()
|
||||
|
|
|
@ -443,8 +443,10 @@ 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)
|
||||
def live_cached():
|
||||
@cache.memoize(timeout=86400,
|
||||
forced_update=(lambda force=False: force),
|
||||
args_to_ignore=["force"])
|
||||
def live_cached(force=False):
|
||||
live = []
|
||||
offline = []
|
||||
db = db_session()
|
||||
|
|
Loading…
Reference in New Issue