Multiple id request for FaciaPress

Instead of requesting each piece of content individually and concurrently, this switches to requesting content through the `/search` endpoint using an `id` filter.

This means `facia-press` will make a lot less individual requests to the `Content API` in favour of requests that carry more data.
So now, requests are batched to the amount of items per **single** request AND on top of that they are batched to how many of these requests can run concurrently; which is currently the case except with single ID requests.

@stephanfowler @robertberry 
Never heard the phrase 'kill your darlings'? ;-)

On 14 October 2014 17:49, Francis <notifications@github.com> wrote:

> In facia-press/app/frontpress/ParseCollection.scala:
>
> > @@ -153,26 +153,33 @@ trait ParseCollection extends ExecutionContexts with QueryDefaults with Logging
> >    }
> >
> >    private def batchGetContentApiItems(collectionItems: Seq[TrailId],
> > -                                      edition: Edition): Future[Map[TrailId, ApiContent]] = {
> > -    Futures.batchedTraverse(collectionItems, Configuration.faciatool.frontPressItemBatchSize)({ collectionItem =>
> > -      getContentApiItemFromCollectionItem(collectionItem, edition) map { maybeItem =>
> > -        maybeItem.map(collectionItem -> _)
> > +                                      edition: Edition): Future[Map[TrailId, ApiContent]] =
> > +    Futures.batchedTraverse(collectionItems.grouped(Configuration.faciatool.frontPressItemSearchBatchSize).toSeq, Configuration.faciatool.frontPressItemBatchSize)({ collectionItems =>
>
> Yeah, why not? We made it, might as well use it. [image: :smile:]
>
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/guardian/frontend/pull/6485/files#r18841435>.
>

-- 

------------------------------
Visit theguardian.com. On your mobile and tablet, download the Guardian 
iPhone and Android apps theguardian.com/guardianapp and our tablet editions 
theguardian.com/editions.  Save up to 57% by subscribing to the Guardian 
and Observer - choose the papers you want and get full digital access. 
 Visit subscribe.theguardian.com

This e-mail and all attachments are confidential and may also be 
privileged. If you are not the named recipient, please notify the sender 
and delete the e-mail and all attachments immediately. Do not disclose the 
contents to another person. You may not use the information for any 
purpose, or store, or copy, it in any way.  Guardian News & Media Limited 
is not liable for any computer viruses or other material transmitted with 
or as part of this e-mail. You should employ virus checking software.
 
Guardian News & Media Limited is a member of Guardian Media Group plc. Registered 
Office: PO Box 68164, Kings Place, 90 York Way, London, N1P 2AP.  Registered 
in England Number 908396