nickelser / activejob-traffic_control

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

Bugfix: Wrong option name passed to Suo for `wait_timeout` option #15

Open pfeiffer opened 4 years ago

pfeiffer commented 4 years ago

The parameter needed to control wait_timeout is named acquisition_timeout in Suo (https://github.com/nickelser/suo/blob/master/lib/suo/client/base.rb#L5) not acquisition_lock.

Essentially the current wait_timeout option is a no-op; it doesn't control anything. This PR fixes this and passes the correct parameter name to the Suo lock.