Slow

55 views
Skip to first unread message

Kubber

unread,
May 11, 2022, 6:06:23 AM5/11/22
to Google Ads API and AdWords API Forum
I'm trying to remove CampaignCriterionOperation using BatchJobService.

It used to work quite quick until last Thursday, but now it's very slow it can take 30 minutes before it's done, and the amount of data is the very same.
I see the same issue on uploading CampaignCriteria.

How long should it take to delete let's say 20000 criteria?
 
I'm using code more less like this:


batch_job_service = client.get_service("BatchJobService")
batch_job_operation = client.get_type("BatchJobOperation")

batch_job = client.get_type("BatchJob")
client.copy_from(batch_job_operation.create, batch_job)                
response = batch_job_service.mutate_batch_job(
                    customer_id=customer_id, operation=batch_job_operation
                )
resource_name = response.result.resource_name

operations = []
for cbm in chunk:
    campaign_criterion_operation = client.get_type("CampaignCriterionOperation")
    campaign_id = cbm.split(',')[0]
    criterion_id = cbm.split(',')[1]
    campaign_criterion_operation.remove = f"customers/{customer_id}/campaignCriteria/{campaign_id}~{criterion_id}"
    mutate_operation = client.get_type("MutateOperation")
    client.copy_from(getattr(mutate_operation, "campaign_criterion_operation"), campaign_criterion_operation)
    operations.append(mutate_operation)

batch_job_service.add_batch_job_operations(
    resource_name=resource_name,
    mutate_operations=operations,
)
response = batch_job_service.run_batch_job(resource_name=resource_name)
               

for i in range(1, 20):
    time.sleep(10*i)
    if response.done():
       ...

Cheers,
Jakub

Skander Mansouri

unread,
May 11, 2022, 9:18:20 AM5/11/22
to Google Ads API and AdWords API Forum
Everyone is experiecing an issue with this batch job service. and we are waiting for Google to confirm this!

Google Ads API Forum Advisor

unread,
May 11, 2022, 2:15:26 PM5/11/22
to ska...@armis.tech, adwor...@googlegroups.com
Hi All,

Thanks for your patience on this. This issue should be resolved now. Can you please retry your batch job requests and let us know if you run into the same issue?

Thanks,
Matt
Google Ads API Team

Google Logo
Matt
Google Ads API Team
 


ref:_00D1U1174p._5004Q2armQq:ref

Kubber

unread,
May 11, 2022, 3:40:34 PM5/11/22
to Google Ads API and AdWords API Forum
Perfect! I see jobs running way quicker now. Thanks Matt. 
Reply all
Reply to author
Forward
0 new messages