Skip to content

Commit

Permalink
Merge pull request #2310 from manyfold3d/set-redis-pool
Browse files Browse the repository at this point in the history
Set connection pool size for ActiveJob::Status to same as DB
  • Loading branch information
Floppy authored Jun 26, 2024
2 parents 29541a7 + cc370e7 commit 3d4da80
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 3d4da80

Please sign in to comment.