remove repeated commit statements

pull/199/head
Aevann 2023-09-14 01:19:07 +03:00
parent ef906cb8da
commit e489314ab9
3 changed files with 0 additions and 8 deletions

View File

@ -84,8 +84,6 @@ def start_new_lottery_session():
lottery.is_active = True
g.db.add(lottery)
g.db.commit() # Intentionally commit early, not autocommitted from cron
def check_if_end_lottery_task():
active_lottery = get_active_lottery()

View File

@ -29,8 +29,6 @@ def offsite_mentions_task(cache):
user_mentions = get_mentions(cache, [query], reddit_notifs_users=True)
notify_mentions(user_mentions, send_to=send_user, mention_str='mention of you')
g.db.commit() # commit early otherwise localhost testing fails to commit
def get_mentions(cache, queries, reddit_notifs_users=False):
mentions = []
for kind in ('submission', 'comment'):

View File

@ -215,10 +215,6 @@ def spin_roulette_wheel():
game.active = False
g.db.add(game)
# Commit early when dirty because of long-running tasks after roulette
g.db.commit()
def determine_roulette_winners(number, bets):
winners = []
payouts = {}