Module: Hyrax::Lockable

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

Instance Method Summary collapse

Instance Method Details

#acquire_lock_for(lock_key, &block) ⇒ Object



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

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

#lock_managerObject



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

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