forked from rDrama/rDrama
remove leftover code
parent
d291ddb0cb
commit
24fc61fedf
|
@ -47,9 +47,6 @@ def cron_fn(every_5m, every_1d, every_1mo):
|
||||||
_award_timers_task()
|
_award_timers_task()
|
||||||
g.db.commit()
|
g.db.commit()
|
||||||
|
|
||||||
_unpin_expired()
|
|
||||||
g.db.commit()
|
|
||||||
|
|
||||||
_grant_one_year_badges()
|
_grant_one_year_badges()
|
||||||
g.db.commit()
|
g.db.commit()
|
||||||
|
|
||||||
|
@ -316,22 +313,6 @@ def _award_timers_task():
|
||||||
})
|
})
|
||||||
_process_timer(User.flairchanged, [96], "Your temporary flair-lock has expired. You can now change your flair!")
|
_process_timer(User.flairchanged, [96], "Your temporary flair-lock has expired. You can now change your flair!")
|
||||||
|
|
||||||
|
|
||||||
def _unpin_expired():
|
|
||||||
t = int(time.time())
|
|
||||||
pins = []
|
|
||||||
|
|
||||||
for cls in (Post, Comment):
|
|
||||||
pins += g.db.query(cls).options(load_only(cls.id)).filter(cls.stickied_utc < t)
|
|
||||||
|
|
||||||
for pin in pins:
|
|
||||||
pin.stickied = None
|
|
||||||
pin.stickied_utc = None
|
|
||||||
g.db.add(pin)
|
|
||||||
|
|
||||||
if pins:
|
|
||||||
cache.delete_memoized(frontlist)
|
|
||||||
|
|
||||||
def _give_marseybux_salary():
|
def _give_marseybux_salary():
|
||||||
for u in g.db.query(User).filter(User.admin_level > 0).all():
|
for u in g.db.query(User).filter(User.admin_level > 0).all():
|
||||||
marseybux_salary = u.admin_level * 10000
|
marseybux_salary = u.admin_level * 10000
|
||||||
|
|
Loading…
Reference in New Issue