@bensheldon after your help on Slack i can confirm this works fine and i think adding it to the docs will help others in the future.
config/initializers/good_job.rb
Rails.application.configure do
ActionMailer::MailDeliveryJob.include GoodJob::ActiveJobExtensions::Concurrency
ActionMailer::MailDeliveryJob.good_job_control_concurrency_with(
perform_throttle: [ 2, 2.second ]
)
end
In my case perform_throttle: [ 1, 1.second ] did not work as expected. It would send more than 1 per second and i would hit the rate limit on the Resend API. 2 in 2 seconds seems to work though.
@bensheldon after your help on Slack i can confirm this works fine and i think adding it to the docs will help others in the future.
config/initializers/good_job.rb
In my case
perform_throttle: [ 1, 1.second ]
did not work as expected. It would send more than 1 per second and i would hit the rate limit on the Resend API. 2 in 2 seconds seems to work though.