Skip to content

Commit

Permalink
Merge pull request #8531 from gitcoinco/kevin/prevent_contributions_n…
Browse files Browse the repository at this point in the history
…ot_saving

prevent contributions not saving if compress issue
  • Loading branch information
owocki authored Mar 10, 2021
2 parents 3659b98 + 3bb9012 commit c7a1ffc
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions app/grants/tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -254,15 +254,21 @@ def process_grant_contribution(self, grant_id, grant_slug, profile_id, package,
comment=comment)

# emails to grant owner
new_supporter(grant, subscription)
try:
new_supporter(grant, subscription)
except Exception as e:
logger.exception(e)

# emails to contributor
if send_supporter_mail:
grants_with_subscription = [{
'grant': grant,
'subscription': subscription
}]
thank_you_for_supporting(grants_with_subscription)
try:
thank_you_for_supporting(grants_with_subscription)
except Exception as e:
logger.exception(e)

update_grant_metadata.delay(grant_id)
return grant, subscription
Expand All @@ -288,7 +294,10 @@ def batch_process_grant_contributions(self, grants_with_payload, profile_id, ret
"grant": grant,
"subscription": subscription
})
thank_you_for_supporting(grants_with_subscription)
try:
thank_you_for_supporting(grants_with_subscription)
except Exception as e:
logger.exception(e)


@app.shared_task(bind=True, max_retries=1)
Expand Down

0 comments on commit c7a1ffc

Please sign in to comment.