Sha256: 4d28c18d6e5bd58479dfd59bb1f73f2d7aad97edafe191e59b985a5dd06d4bc5
Contents?: true
Size: 632 Bytes
Versions: 4
Compression:
Stored size: 632 Bytes
Contents
module Fog module DNS class Rackspace module Callback protected def wait_for_job(job_id, timeout=Fog.timeout, interval=1) retries = 5 response = nil Fog.wait_for(timeout, interval) do response = connection.callback job_id if response.body['status'] != 'RUNNING' true elsif retries == 0 raise Fog::Errors::Error.new("Wait on job #{job_id} took too long") else retries -= 1 false end end response end end end end end
Version data entries
4 entries across 4 versions & 2 rubygems