Module: Hyrax::Lockable

Extended by:
ActiveSupport::Concern
Included in:
Actors::FileSetActor
Defined in:
app/services/hyrax/lockable.rb

Instance Method Summary collapse

Instance Method Details

#acquire_lock_for(lock_key, &block) ⇒ Object



5
6
7
# File 'app/services/hyrax/lockable.rb', line 5

def acquire_lock_for(lock_key, &block)
  lock_manager.lock(lock_key, &block)
end

#lock_managerObject



9
10
11
12
13
14
15
# File 'app/services/hyrax/lockable.rb', line 9

def lock_manager
  @lock_manager ||= LockManager.new(
    Hyrax.config.lock_time_to_live,
    Hyrax.config.lock_retry_count,
    Hyrax.config.lock_retry_delay
  )
end