lib/gooddata/models/report.rb in gooddata-0.5.6 vs lib/gooddata/models/report.rb in gooddata-0.5.7
- old
+ new
@@ -33,19 +33,15 @@
end
def execute
# puts "Executing report #{uri}"
result = GoodData.post '/gdc/xtab2/executor3', {"report_req" => {"report" => uri}}
-
- dataResultUri = result["reportResult2"]["content"]["dataResult"]
+ dataResultUri = result["execResult"]["dataResult"]
result = GoodData.get dataResultUri
- return EmptyResult.new([]) if result.nil?
-
while result["taskState"] && result["taskState"]["status"] == "WAIT" do
- sleep 10
- result = GoodData.get dataResultUri
- end
- ReportDataResult.new(GoodData.get dataResultUri)
+ sleep 10
+ result = GoodData.get dataResultUri
+ end
+ ReportDataResult.new(GoodData.get dataResultUri)
end
-
end
end