Module: Bosh::Director::ModelHelper

Included in:
Bosh::Director::Models::Dns::Domain
Defined in:
lib/bosh/director/models/helpers/model_helper.rb

Instance Method Summary collapse

Instance Method Details

#safe_find_or_create(options) ⇒ Object



2
3
4
5
6
# File 'lib/bosh/director/models/helpers/model_helper.rb', line 2

def safe_find_or_create(options)
  Bosh::Common.retryable(sleep: 0.1, tries: 2, on: [Exception]) do
    find_or_create(options)
  end
end