lib/gooddata/client.rb in gooddata-0.5.9 vs lib/gooddata/client.rb in gooddata-0.5.10

- old
+ new

@@ -186,9 +186,21 @@ # GoodData.delete '/gdc/project/1' def delete(path, options = {}) connection.delete path, options end + def poll(result, key) + link = result[key]["link"]["poll"] + response = GoodData.get(link, :process => false) + while response.code != 204 + sleep 5 + GoodData.connection.retryable(:tries => 3, :on => RestClient::InternalServerError) do + sleep 5 + response = GoodData.get(link, :process => false) + end + end + end + def test_login connection.connect! connection.logged_in? end