nickelser / activejob-traffic_control

Rate limiting/job enabling for ActiveJob using distributed locks in Redis or Memcached.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Question: Where to put the initializer

scarroll32 opened this issue · comments

commented

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.