nickelser / activejob-traffic_control

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

Suo && unlock token #7

Closed avokhmin closed 6 years ago

avokhmin commented 6 years ago

Hello.

Should we do unlock of token?

see:

# manually locking/unlocking
# the return value from lock without a block is a unique token valid only for the current lock
# which must be unlocked manually
token = suo.lock
foo.baz!
suo.unlock(token)
avokhmin commented 6 years ago

ah, I found answer.