We are also facing this issue. Tried increasing the MAX_TOTAL_POLL_INTERVAL_SECONDS from 60 to 180 but no luck. Please suggest a work around.
On Saturday, May 7, 2022 at 3:26:42 AM UTC+5:30 [email protected] wrote: > Hello, > > > Our batch jobs started failing out of nowhere. It looks like our function > to fetchAndReturnResults is ending before the batch job is complete. I've > tried to increase the `MAX_TOTAL_POLL_INTERVAL_SECONDS` to 180, but still > no luck. Is there more latency today? > > I've provided the constants and function below: > > //Constants > const POLL_FREQUENCY_SECONDS = 1; > private const MAX_TOTAL_POLL_INTERVAL_SECONDS = 180; > private const PAGE_SIZE = 1000; > > > > function fetchAndReturnResults( > BatchJobServiceClient $batchJobServiceClient, > string $batchJobResourceName > ) { > $results = []; > // Gets all the results from running batch job and print their information. > try{ > > $batchJobResults = $batchJobServiceClient->listBatchJobResults( > $batchJobResourceName, > ['pageSize' => self::PAGE_SIZE, "responseContentType"=>2] > ); > > foreach ($batchJobResults->iterateAllElements() as $batchJobResult) { > $results[] = $batchJobResult; > } > > return $results; > } > catch(GoogleAdsException $googleAdsException){ > foreach ($googleAdsException->getGoogleAdsFailure()->getErrors() as > $error) { > $results['error'][] = ['status'=>$error->getErrorCode()->getErrorCode(), > 'err'=> $error->getMessage()]; > } > } > catch(Exception $e){ > $results['error'][] = ['status'=>$e->getCode(), 'err'=>$e->getMessage()]; > } > > finally { > return $results; > } > } > > Right now the exception is being hit and returning an error that I can't > retrieve results until batch job is finished. > > This has been working for two months, so strange it would suddenly break. > Should I be doing something else here? > > Thanks for your help. > > Best, > Matt > -- -- =~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~ Also find us on our blog: https://googleadsdeveloper.blogspot.com/ =~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~ You received this message because you are subscribed to the Google Groups "AdWords API and Google Ads API Forum" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/adwords-api?hl=en --- You received this message because you are subscribed to the Google Groups "Google Ads API and AdWords API Forum" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/adwords-api/65302524-b34f-47bf-b763-8912b1b4041en%40googlegroups.com.
