Why await is not taken in consideration after deploy?

Posted by Cristian Boariu on Stack Overflow See other posts from Stack Overflow or by Cristian Boariu
Published on 2012-10-12T14:38:56Z Indexed on 2012/10/13 21:37 UTC
Read the original article Hit count: 199

I have a method which does some sync calls to a specific REST api, something like:

WSRequestHolder url = WS.url("rest_api_url");
Promise<WS.Response> promisePerPage = url.get();
promisePerPage.getWrappedPromise().await(3000, TimeUnit.MILLISECONDS);
WS.Response responsePerPage = promisePerPage.get();
ProductsWrapper productsWrapper = new Gson().fromJson(responsePerPage.getBody(), ProductsWrapper.class);

As you notice, I put 3 seconds between calls so each request can be parsed in time and inserted in DB. All works great locally but after I deploy to cloud, all goes continuously, without any more waiting (3 seconds) between requests...

Do you know why?

© Stack Overflow or respective owner

Related posts about playframework-2.0

Related posts about cloudbees