File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -182,23 +182,23 @@ perform any other re-initialization.
182182
183183You can reduce the frequency that your configuration loader is called by
184184wrapping it with `Resque::Pool::ConfigLoaders::Throttled` and specifying a time
185- (in seconds) to cache the previous value (see [the
186- spec](spec/config_loaders/throttled_spec.rb) for more details) :
185+ (in seconds) to cache the previous value :
187186
188187` ` ` ruby
189188task "resque:pool:setup" do
190189 redis_loader = lambda do |env|
191190 worker_count = Redis.current.get("pool_workers_#{env}").to_i
192- {"queueA,queueB" => worker_count }
191+ { "queueA,queueB" => worker_count }
193192 end
194193
195194 # calls through to redis_loader at most once per 10 seconds
196- Resque::Pool.config_loader = Resque::Pool::ConfigLoaders::Throttled(
195+ Resque::Pool.config_loader = Resque::Pool::ConfigLoaders::Throttled.new (
197196 redis_loader, period: 10
198197 )
199198end
200199` ` `
201200
201+ See [the spec](spec/config_loaders/throttled_spec.rb) for more details.
202202
203203Zero-downtime code deploys
204204--------------------------
You can’t perform that action at this time.
0 commit comments