Skip to content

Commit

Permalink
Bust cache
Browse files Browse the repository at this point in the history
  • Loading branch information
alextwoods committed Dec 4, 2024
1 parent 76b3cf8 commit 75982f5
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
1 change: 1 addition & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ jobs:
with:
ruby-version: ${{ matrix.ruby }}
bundler-cache: true
cache-version: 0912834390128

- name: Test
run: bundle exec rake spec
Expand Down
8 changes: 4 additions & 4 deletions lib/aws/rails/middleware/elastic_beanstalk_sqsd.rb
Original file line number Diff line number Diff line change
Expand Up @@ -42,14 +42,14 @@ def shutdown(timeout = nil)
private

def init_executor
threads = Integer(ENV.fetch('AWS_PROCESS_BEANSTALK_WORKER_THREADS',
Concurrent.available_processor_count || Concurrent.processor_count))
puts "Running with threads: #{threads}"
options = {
max_threads: Integer(Concurrent.available_processor_count || Concurrent.processor_count),
max_threads: threads,
max_queue: 1,
fallback_policy: :abort # Concurrent::RejectedExecutionError must be handled
}
if ENV['AWS_PROCESS_BEANSTALK_WORKER_THREADS']
options[:max_threads] = Integer(ENV['AWS_PROCESS_BEANSTALK_WORKER_THREADS'])
end
@executor = Concurrent::ThreadPoolExecutor.new(options)
at_exit { shutdown }
end
Expand Down

0 comments on commit 75982f5

Please sign in to comment.