mirror of
https://github.com/fog/fog.git
synced 2022-11-09 13:51:43 -05:00
raise error in Model#reload if the thing goes away
This commit is contained in:
parent
c70fb49dac
commit
45cc1e5099
1 changed files with 4 additions and 1 deletions
|
@ -115,7 +115,10 @@ module Fog
|
||||||
|
|
||||||
def wait_for(timeout = 600, &block)
|
def wait_for(timeout = 600, &block)
|
||||||
reload
|
reload
|
||||||
Fog.wait_for(timeout) { reload && instance_eval(&block) }
|
Fog.wait_for(timeout) do
|
||||||
|
reload or raise StandardError.new("Reload failed, #{self.class} #{self.identity} went away.")
|
||||||
|
instance_eval(&block)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
private
|
private
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue