Merge branch 'frost' of https://github.com/Aevann1/rDrama into frost
After Width: | Height: | Size: 13 KiB |
After Width: | Height: | Size: 8.5 KiB |
After Width: | Height: | Size: 19 KiB |
After Width: | Height: | Size: 17 KiB |
After Width: | Height: | Size: 7.8 KiB |
After Width: | Height: | Size: 11 KiB |
After Width: | Height: | Size: 1.4 MiB |
After Width: | Height: | Size: 32 KiB |
After Width: | Height: | Size: 24 KiB |
After Width: | Height: | Size: 10 KiB |
After Width: | Height: | Size: 63 KiB |
After Width: | Height: | Size: 3.2 KiB |
After Width: | Height: | Size: 1.7 KiB |
After Width: | Height: | Size: 3.7 KiB |
After Width: | Height: | Size: 6.1 KiB |
After Width: | Height: | Size: 814 B |
After Width: | Height: | Size: 5.7 KiB |
After Width: | Height: | Size: 318 KiB |
After Width: | Height: | Size: 259 KiB |
After Width: | Height: | Size: 18 KiB |
|
@ -840,11 +840,14 @@ class User(Base):
|
|||
g.db.add(self)
|
||||
g.db.commit()
|
||||
return
|
||||
if u.is_suspended_permanently:
|
||||
self.shadowbanned = u.banned_by.username
|
||||
g.db.add(self)
|
||||
g.db.commit()
|
||||
return
|
||||
## Disabled pending better solution: permabans haven't propagated for
|
||||
## most of Summer 2022. We've gotten somewhat used to this. Think we only
|
||||
## want them to propagate on account creation? Or at least needs discussion.
|
||||
# if u.is_suspended_permanently:
|
||||
# self.shadowbanned = u.banned_by.username
|
||||
# g.db.add(self)
|
||||
# g.db.commit()
|
||||
# return
|
||||
|
||||
@property
|
||||
@lazy
|
||||
|
|
|
@ -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()
|
||||
|
|