aws / aws-sdk-rails

Official repository for the aws-sdk-rails gem, which integrates the AWS SDK for Ruby with Ruby on Rails.
Other
596 stars 62 forks source link

No longer rely on caller_runs for backpressure in sqs active job executor #124

Closed alextwoods closed 5 months ago

alextwoods commented 5 months ago

Changes the fallback_policy on the executor to :abort instead of using caller_runs. This will raise an Concurrent::RejectedExecutionError when posting to the executor when it does not have capacity. It then uses a Concurrent:Event to block the calling thread until the next task completes.

Issue #, if available: Fixes #123

Description of changes:

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.