var timestamp = Utilities.formatDate(new Date(), 'America/Chicago', 'yyyy-MM-dd-HH:mm:ss').toString();
function main() {
Logger.log('Before we start - timestamp = ' + timestamp);
var accountSelector = MccApp.accounts(); accountSelector.executeInParallel('processClientAccount','finalCleanUp');}
function processClientAccount() {
}
function finalCleanUp() { Logger.log('My timestamp = ' + timestamp);}
Hi Aaron,
Thank you for raising this to us.
I was able to recreate the scenario you've mentioned. In addition, I was able to match the timestamp (start and end) by commenting out the statement with the executeInParallel method and just calling the finalCleanUp method after the 1st logger statement.
As an aside, allow me to raise this with the rest of the team to gather insights regarding on this. I'll get back to you once I receive any updates from them.
Regards,
Markie
Google Ads Scripts Team
var timestamp = Utilities.formatDate(new Date(), 'America/Chicago', 'yyyy-MM-dd-HH:mm:ss').toString();
function main() { Logger.log('Before we start - timestamp = ' + timestamp);
var accountSelector = MccApp.accounts();
accountSelector.executeInParallel('processClientAccount','finalCleanUp',timestamp);}
function processClientAccount(timestamp) {
return JSON.stringify({timestamp:timestamp}); }
function finalCleanUp(results) { if (results.length > 0) { var obj = JSON.parse(results[0].getReturnValue()); Logger.log('Cleaning up the mess - timestamp = ' + obj.timestamp); } }