nickelser / activejob-traffic_control

Rate limiting/job enabling for ActiveJob using distributed locks in Redis or Memcached.
298 stars 27 forks source link

Question: Where to put the initializer #17

Open scarroll32 opened 3 years ago

scarroll32 commented 3 years ago

In the docs it mentions we need to run:

ActiveJob::TrafficControl.client = ConnectionPool.new(size: 5, timeout: 5) { Redis.new } # set poolthresholds as needed

I assume it can just go in any initializer. I have put that in my config/initializers/active_job.rb.

Is this correct? I'm happy to submit a PR to update the docs.