Method: UniqueThread#initialize

Defined in:
lib/unique_thread.rb

#initialize(name, downtime: 30, logger: default_logger, redis: Redis.new) ⇒ UniqueThread

Returns a new instance of UniqueThread.



11
12
13
14
15
# File 'lib/unique_thread.rb', line 11

def initialize(name, downtime: 30, logger: default_logger, redis: Redis.new)
  @logger    = logger
  @stopwatch = Stopwatch.new(downtime: downtime)
  @locksmith = Locksmith.new(name: name, stopwatch: stopwatch, redis: redis, logger: logger)
end