Skip to content

Instantly share code, notes, and snippets.

@crazycode
Created November 23, 2012 00:03
Show Gist options
  • Save crazycode/4133390 to your computer and use it in GitHub Desktop.
Save crazycode/4133390 to your computer and use it in GitHub Desktop.
playframework 1.x await
public static void syncAmazon(final String sid) {
// play status 检查平均耗时 2.5s , 开放线程时间 3s 后回掉
await(new Job<Selling>() {
@Override
public Selling doJobWithResult() throws Exception {
Selling selling = Selling.findById(sid);
selling.syncFromAmazon();
return selling;
}
}.now());
renderJSON(new Ret());
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment