Hi Eliya,

1. It is not possible to execute a MJS job atomically. MJS breaks a job 
into smaller batches and execute each batch atomically. But batch size is 
usually smaller than job size, and hence the possibility exists that some 
operations may succeed in a job, others won't. What you can do is to check 
the operations using the synchronous APIs and validateOnly header = true to 
make sure that your operations don't have any errors, and then submit the 
operations as a job.

2. Once you submit an MJS, it cannot be cancelled. To overcome the issue 
you mentioned, you could either increase the poll interval, or you could 
check the change history to see if the changes went live.

The code example shows polling a certain number of times for illustrative 
purposes, but what you may do in a production environment may be different 
(e.g. have a timer with callback checking the job status instead of a 
polling loop with a sleep). Also, a MJS job wouldn't sit unprocessed 
infinitely; it would eventually either succeed or fail. If you see an MJS 
sitting as unprocessed for a long while, you could post its id on the forum 
and ask an API Advisor to investigate the issue.

Hope this helps. Let me know if you have more questions.

Cheers,
Anash P. Oommen,
AdWords API Advisor.

On Monday, 26 March 2012 16:31:15 UTC+5:30, Eliya wrote:
>
> Hi,
> I am having some problems with making sure mutate in mutateJobService is 
> actually executing the desired operations:
>
> 1. I want all operations in a specific job to be atomic. Intuitively, I 
> could disable the partialFailure request header, but as I see in 
> documentation, it is relevant only for AdGroupCriterion & AdGroupAdService.
> Furthermore, from this reference I gather that: "MutateJobService always 
> has partialFailure enabled (the getService logic is unnecessary for this 
> service)"
> (
> https://groups.google.com/forum/?fromgroups#!searchin/adwords-api/MutateJobService$20partial$20failure/adwords-api/wdf9OOgl-bw/TlK_e62p4i8J
> )
> Is there any way to make sure all operations succeed/fail together?
>
> 2. I am currently submitting a job and checking its status every period of 
> time for a constant number of tries, as recommended in the examples. This 
> may cause a state where the program was terminated after max timeout, but 
> the job is still running. As after a certain point I can't cancel the job, 
> is there any way to make sure the job is done?
> For example, can I specify a max timeout, after it the job is aborted / 
> considered failed? Or is there one specified by Google I can act upon?
>
> Thank you.
>

-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog and discussion group:
http://adwordsapi.blogspot.com
http://groups.google.com/group/adwords-api
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

You received this message because you are subscribed to the Google
Groups "AdWords API Forum" group.
To post to this group, send email to adwords-api@googlegroups.com
To unsubscribe from this group, send email to
adwords-api+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/adwords-api?hl=en

Reply via email to