File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -875,12 +875,14 @@ def _GetPqlService(self):
875
875
'PublisherQueryLanguageService' , self ._version , self ._server )
876
876
return self ._pql_service
877
877
878
- def WaitForReport (self , report_job ):
878
+ def WaitForReport (self , report_job , pollTimeSeconds = 30 ):
879
879
"""Runs a report, then waits (blocks) for the report to finish generating.
880
880
881
881
Args:
882
882
report_job: The report job to wait for. This may be a dictionary or an
883
883
instance of the SOAP ReportJob class.
884
+ pollTimeSeconds: The number of seconds to wait between calls to getReportJobStatus
885
+ generating before timing out. Defaults to 30 seconds.
884
886
885
887
Returns:
886
888
The completed report job's ID as a string.
@@ -895,7 +897,7 @@ def WaitForReport(self, report_job):
895
897
896
898
while status != 'COMPLETED' and status != 'FAILED' :
897
899
_data_downloader_logger .debug ('Report job status: %s' , status )
898
- time .sleep (30 )
900
+ time .sleep (pollTimeSeconds )
899
901
status = service .getReportJobStatus (report_job_id )
900
902
901
903
if status == 'FAILED' :
@@ -1108,4 +1110,4 @@ def AdManagerClassType(value):
1108
1110
Returns:
1109
1111
str: A string representation of the value response type.
1110
1112
"""
1111
- return value .__class__ .__name__
1113
+ return value .__class__ .__name__
You can’t perform that action at this time.
0 commit comments