Module: RedisSingleFile

Defined in:
lib/redis_single_file.rb,
lib/redis_single_file/version.rb,
lib/redis_single_file/semaphore.rb,
lib/redis_single_file/configuration.rb

Overview

RedisSingleFile - Distributed Execution Synchronization

Redis single file is a queue-based implementation of a remote/shared semaphore for distributed execution synchronization. A distributed semaphore may be useful for synchronizing execution across numerous instances or between the application and background job workers.

Author:

  • lifeBCE

Defined Under Namespace

Classes: Configuration, Semaphore

Constant Summary collapse

Mutex =

alias semaphore as mutex

Semaphore
QueueTimeout =

internal blpop timeout exception class

Class.new(StandardError)
VERSION =
'0.1.1'

Class Method Summary collapse

Class Method Details

.configuration {|Configuration.instance| ... } ⇒ Object

Yields:



28
29
30
# File 'lib/redis_single_file.rb', line 28

def configuration
  yield Configuration.instance if block_given?
end

.newObject



32
# File 'lib/redis_single_file.rb', line 32

def new(...) = Semaphore.new(...)