Exception: ObjectStorage::ExclusiveLeaseTaken

Inherits:
StandardError
  • Object
show all
Defined in:
app/uploaders/object_storage.rb

Instance Method Summary collapse

Constructor Details

#initialize(lease_key) ⇒ ExclusiveLeaseTaken

Returns a new instance of ExclusiveLeaseTaken.


16
17
18
# File 'app/uploaders/object_storage.rb', line 16

def initialize(lease_key)
  @lease_key = lease_key
end

Instance Method Details

#messageObject


20
21
22
23
# File 'app/uploaders/object_storage.rb', line 20

def message
  *lease_key_group, _ = *@lease_key.split(":")
  "Exclusive lease for #{lease_key_group.join(':')} is already taken."
end