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/5ad8f0fa-76cc-4ddd-9e6e-6b7681a47dc0n%40googlegroups.com.
  • Ba... MATTHEW Dworkin
    • ... 'Narendra Mohan' via Google Ads API and AdWords API Forum
      • ... 'Google Ads API Forum Advisor' via Google Ads API and AdWords API Forum
        • ... Silvia Oggiano
          • ... Skander Mansouri

Reply via email to