-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2155 from betagouv/more-jobs-queues
Add job workers
- Loading branch information
Showing
5 changed files
with
24 additions
and
4 deletions.
There are no files selected for viewing
This file contains 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,6 +1,8 @@ | ||
# frozen_string_literal: true | ||
|
||
class ApplicationMailer < ActionMailer::Base | ||
self.deliver_later_queue_name = :mailers | ||
|
||
prepend IcsMultipartAttached | ||
|
||
default from: "[email protected]" | ||
|
This file contains 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 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 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 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,16 @@ | ||
# frozen_string_literal: true | ||
|
||
# We declare the following queues in the code: | ||
# :cron used in CronJob | ||
# :webhook used in WebhookJob | ||
# :mailers used in ApplicationMailer | ||
# :devise used in CustomDeviseMailer | ||
# :sms used in ApplicationSms | ||
# | ||
# Additionally, we declare the two following queues for lower priority jobs (e.g. Reminders) | ||
# :mailers_low | ||
# :sms_low | ||
Delayed::Worker.queue_attributes = { | ||
mailers_low: { priority: 10 }, # Higher numbers have lower priority. | ||
sms_low: { priority: 10 } | ||
} |