Skip to content

Commit

Permalink
set connection pool size for activejob::status to same as DB
Browse files Browse the repository at this point in the history
  • Loading branch information
Floppy committed Jun 26, 2024
1 parent 162c5b6 commit cc370e7
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion config/initializers/activejob_status.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# Sidekiq and Rails communicate via redis, so we should always use that.
ActiveJob::Status.store = :redis_cache_store, {url: ENV.fetch("REDIS_URL", nil)}
ActiveJob::Status.store = :redis_cache_store, {
url: ENV.fetch("REDIS_URL", nil),
pool: {
size: ActiveRecord::Base.connection.pool.size
}
}

ActiveJob::Status.options = {
includes: %i[status serialized_job exception],
Expand Down

0 comments on commit cc370e7

Please sign in to comment.