Skip to content

Commit 0b06a54

Browse files
authored
Fix AddCustomerMatchUserList to launch the job (#404)
Change-Id: I31040ef644c2eadc45b7bbd9f39ee179f0f4a2c6
1 parent e94a364 commit 0b06a54

1 file changed

Lines changed: 11 additions & 7 deletions

File tree

google-ads-examples/src/main/java/com/google/ads/googleads/examples/remarketing/AddCustomerMatchUserList.java

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -230,14 +230,18 @@ private void addUsersToCustomerMatchUserList(
230230
System.out.printf(
231231
"Successfully added %d operations to the offline user data job.%n",
232232
userDataJobOperations.size());
233-
234-
// Offline user data jobs may take up to 24 hours to complete, so instead of waiting for the
235-
// job to complete, retrieves and displays the job status once. If the job is completed
236-
// successfully, prints information about the user list. Otherwise, prints the query to use
237-
// to check the job again later.
238-
checkJobStatus(
239-
googleAdsClient, customerId, offlineUserDataJobResourceName, userListResourceName);
240233
}
234+
235+
// Issues an asynchronous request to run the offline user data job for executing
236+
// all added operations.
237+
offlineUserDataJobServiceClient.runOfflineUserDataJobAsync(offlineUserDataJobResourceName);
238+
239+
// Offline user data jobs may take up to 24 hours to complete, so instead of waiting for the
240+
// job to complete, retrieves and displays the job status once. If the job is completed
241+
// successfully, prints information about the user list. Otherwise, prints the query to use
242+
// to check the job again later.
243+
checkJobStatus(
244+
googleAdsClient, customerId, offlineUserDataJobResourceName, userListResourceName);
241245
}
242246
}
243247
// [END AddCustomerMatchUserList]

0 commit comments

Comments
 (0)