-
Notifications
You must be signed in to change notification settings - Fork 770
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add BatchJobService support to beta client library. #145
Comments
Hello shakaran, I suppose you're talking about our experimental branch, right? On the other hand, our main branch does provide BatchJobUtils which you can use to do all necessary steps for batch processing, e.g., upload operations, download the results. If you really need to implement batch processing by yourself using our experimental branch, please note that this is not trivial, as the XML serialization/deserialization is needed. For more about batch processing, please read this guide. Best, |
@fiboknacky yes, I am using the experimental since new PSR0 and PSR4 is more easy to handle and write, also for integrate in other frameworks like Symfony. I am doing a little script for add ipblocks for a adwords campaigns. And I almost have it finished, just remains change the batch job status to active after waiting file status. But I still have this issue with upload url. As far I see all the logic in BatchJobUtils for upload is delegated to class BatchJobUtilsDelegate in the method UploadIncrementalBatchJobOperations doing a curl request. So probably I will try to dig it a bit. Add this time, I am not even doing a batch of operations since I get a SizeLimitError.REQUEST_SIZE_LIMIT_EXCEEDED when I put more than one operation in the batch service. So my idea is only block one ip (one operation), and wait the job as DONE, after that make another batch job with one operation and so on. Thanks for all the docs and indications about XML, I will read it and lets see if I can get something for my self. But do you have a estimated roadmap for when will be this supported? For me it is better write this new code using experimental, because probably my client will use for a long time and old lib probably is deprecated in some months or years when experimental gets more stable. |
@fiboknacky @vtsao I see that for implement the Batch Job upload we will need CurlUtils class or similar rewritten for experimental. Should it be included? It would be nice have a new release of experimental with this features soon, since my client is waiting only for this feature and he doesn't want develop with the old master api |
Hi @shakaran
It sounds to me that there is an issue in the BatchJobService, or you've used it in a wrong way.
I can't give you a detailed schedule for that at this moment, but BatchJobUtils may not be available in the experimental branch of this lib very soon, says within 1 month.
We're not planning to use CurlUtils in this new client lib. |
Renaming this bug, adding BJS support to the beta version of this client library is on our timeline for this Q. We'll update this issue as we go along. |
@vtsao do you have some progress with BJS support? |
No updates yet, we're planning to work on it this quarter. |
@vtsao Thanks for the update ;) At least some small fixes were done ;) Keep the good work! |
Hi @vtsao @fiboknacky my client is requesting if we have some progress about this issue, he needs to use this part of code for make a demo and we are trying to avoid the stable version since it is less suitable for new coding. Do you think that we can see progress for this issue soon? |
Hi shakaran@ our current ETA is to have this done and released in the beta lib by the end of this quarter. |
Hi @vtsao just checking the status for this issue since end of Q3 is approaching, there are progress over this issue? |
Yup, still on track to be released by end of this Q. |
Hi @shakaran we've just updated the experimental branch to contain BJS support. Please see: Thanks. |
Thanks @vtsao I will try the new version and I will report if I found some bug or problem. Thanks a lot for your work! |
As far I read here:
https://developers.google.com/adwords/api/docs/reference/v201605/BatchJobService.BatchJob#status
"For versions newer than V201509, make a POST request to the uploadUrl and retrieve the "Location" header from the response as the url to upload operations."
Other SDKs seem have a class BatchJobUploadHelper for poll or POST the upload url.
if I make a direct curl POST request, I am getting a 411 error from google servers since content-length is required. For example:
Even cheating the Content-length I don't get a valid response. So how should I get that the job pass to active? It would be nice a class and method like BatchJobUploadHelper::upload($batch_job)
The text was updated successfully, but these errors were encountered: