Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion osf/email/notification_campaign.py
Original file line number Diff line number Diff line change
Expand Up @@ -656,7 +656,10 @@ def send_campaign_batch(
},
rendered_html=rendered_html,
)
recipient.status = NotificationCampaignRecipientStatus.SENT
if settings.CAMPAIGN_SINGLE_SEND_WEBHOOK:
recipient.status = NotificationCampaignRecipientStatus.AWAITING_DELIVERY
else:
recipient.status = NotificationCampaignRecipientStatus.SENT
recipient.error_message = None
recipient_records.append(recipient)
except Exception as exc:
Expand Down
1 change: 1 addition & 0 deletions website/settings/defaults.py
Original file line number Diff line number Diff line change
Expand Up @@ -216,6 +216,7 @@ def parent_dir(path):
# The following are rough estimates so we can log to sentry those batches and sendgrid quests which run longer than normal
ESTIMATED_PER_REQUEST_THRESHOLD = 0.3 # On production, sending one email via SendGrid takes 0.20 ~ 0.50 seconds, set default alert threshold at 0.30s
ESTIMATED_BATCH_RUN_TIME_THRESHOLD = 300 # On production, with batch size 1000, we expect each batch to finish within 300s (5m)
CAMPAIGN_SINGLE_SEND_WEBHOOK = False # If True, recipient will be marked as SENT/FAILED/SKIPPED based on SendGrid webhook event, instead of when the request is completed.
Comment thread
cslzchen marked this conversation as resolved.

# Configuration for "We miss you at OSF" email (`NotificationTypeEnum.USER_NO_LOGIN`)
# Note: 1) we can gradually increase `MAX_DAILY_NO_LOGIN_EMAILS` to 10000, 100000, etc. or set it to `None` after we
Expand Down
Loading