-
-
Notifications
You must be signed in to change notification settings - Fork 199
feat: add configurable async email delivery for workshop invitations #2592
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
mroderick
merged 4 commits into
codebar:master
from
mroderick:feature/delayed-email-async
Apr 25, 2026
Merged
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
1ca0595
chore: configure ActiveJob adapter and async email feature flag
mroderick feec53e
feat: add ApplicationJob with global error handling
mroderick f78728a
feat: add AsyncEmailConcern for chapter-based async email detection
mroderick 6285351
feat: use conditional async email in workshop invitation manager
mroderick File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,2 +1,6 @@ | ||
| class ApplicationJob < ActiveJob::Base | ||
| rescue_from(Exception) do |exception| | ||
| Rails.error.report(exception) | ||
| raise | ||
| end | ||
| end | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,11 @@ | ||
| module AsyncEmailConcern | ||
| extend ActiveSupport::Concern | ||
|
|
||
| private | ||
|
|
||
| def async_email_enabled?(chapter) | ||
| return false if chapter.nil? | ||
| return false if Rails.application.config.async_email_chapter_ids.empty? | ||
| Rails.application.config.async_email_chapter_ids.include?(chapter.id) | ||
| end | ||
| end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,34 @@ | ||
| RSpec.describe AsyncEmailConcern do | ||
| let(:concern_class) do | ||
| Class.new { include AsyncEmailConcern } | ||
| end | ||
| let(:instance) { concern_class.new } | ||
|
|
||
| describe "#async_email_enabled?" do | ||
| context "when ASYNC_EMAIL_CHAPTER_IDS is empty" do | ||
| before { Rails.application.config.async_email_chapter_ids = [] } | ||
|
|
||
| it "returns false" do | ||
| expect(instance.send(:async_email_enabled?, OpenStruct.new(id: 1))).to be false | ||
| end | ||
| end | ||
|
|
||
| context "when chapter is in async list" do | ||
| before { Rails.application.config.async_email_chapter_ids = [1, 7] } | ||
|
|
||
| it "returns true for matching chapter" do | ||
| expect(instance.send(:async_email_enabled?, OpenStruct.new(id: 1))).to be true | ||
| end | ||
|
|
||
| it "returns false for non-matching chapter" do | ||
| expect(instance.send(:async_email_enabled?, OpenStruct.new(id: 2))).to be false | ||
| end | ||
| end | ||
|
|
||
| context "when chapter is nil" do | ||
| it "returns false" do | ||
| expect(instance.send(:async_email_enabled?, nil)).to be false | ||
| end | ||
| end | ||
| end | ||
| end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.