lib/gooddata/models/report.rb in gooddata-0.5.1 vs lib/gooddata/models/report.rb in gooddata-0.5.2
- old
+ new
@@ -12,18 +12,19 @@
end
def execute
# puts "Executing report #{uri}"
result = GoodData.post '/gdc/xtab2/executor3', {"report_req" => {"report" => uri}}
+
dataResultUri = result["reportResult2"]["content"]["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
- data_result = ReportDataResult.new(GoodData.get dataResultUri)
- data_result
+ ReportDataResult.new(GoodData.get dataResultUri)
end
end
end