Celebird,
I agree with your last paragraph "... so the service.batch can be
issued near the 1mb limit ..."
and that is what I'm trying to do in a batch add entry loop.
Here is how I'm going to do it. I encapsulated feed size, entry size,
sending a batch and creating a feed into methods.
I'm not too sure what the value of MAX_GOOGLE_BASE_FEED_SIZE should
be since my code, posted above,
returns the number of characters not the number of bytes. I'm in for
a bit of trial-and-error I guess.
Here is the code:
-- prior to this code segment in the batch entry loop we build a
GoogleBaseEntry as gentry
if ( getGoogleBaseFeedSize(feed) + getGoogleBaseEntrySize(gentry) >
MAX_GOOGLE_BASE_FEED_SIZE) {
insertStatus = sendBatch ( service, feed, errLog, idLog );
feed = getGoogleBaseFeed(service) ;
}
feed.addEntry(gentry);
-- back to the top of the loop
-=beeky
On Sep 27, 6:40 am, Celebird <[EMAIL PROTECTED]> wrote:
> that's great to know; thanks.
>
> is this being done in something like an add-entry loop?
> otherwise, can you say why that doesn't have
> the same similar issue as eric's suggestion --
> not knowing until after-the-fact if the limit is reached.
>
> i would think the per-entry count is required
> so the service.batch can be issued near the
> 1mb limit and then continue re-adding entries.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Google Base Data API" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/Google-Base-data-API?hl=en
-~----------~----~----~----~------~----~------~--~---