Skip to content
/ dlm Public

Conservative redis based ruby distributed lock manager

License

Notifications You must be signed in to change notification settings

sspreitzer/dlm

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

dlm

Conservative redis based ruby distributed lock manager

Requirements

This gem requires a running redis server and the redis ruby gem.

Usage

gem install dlm

or Gemfile

source 'https://rubygems.org'

gem 'dlm'

Example

require 'dlm'

dlm = DLM.new

dlm.lock('test')
# do work here
dlm.unlock('test')

Use a custom Redis instance

require 'dlm'

dlm = DLM.new(Redis.new(url: 'redis://myredisserver'))

Reuse an existing Redis instance

require 'dlm'

redis = Redis.new(url: 'redis://myotherredis')

dlm = DLM.new(redis)

Copyright

Sascha Spreitzer (c) 2018, MIT license

About

Conservative redis based ruby distributed lock manager

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages