aggregate poster log

master
Yixian 3 years ago
parent 17b012fd42
commit 925909f05f

@ -2700,12 +2700,14 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
public void writeAggregatePoster(JSONObject manager, String clientMoniker, OutputStream ous) { public void writeAggregatePoster(JSONObject manager, String clientMoniker, OutputStream ous) {
JSONObject client = clientDetail(manager, clientMoniker); JSONObject client = clientDetail(manager, clientMoniker);
try { try {
logger.debug("downloading aggregate poster from {}", clientMoniker); String url = PlatformEnvironment.getEnv().concatUrl("/static/images/new_aggregate_poster.png");
logger.debug("downloading aggregate poster from {}--{}", clientMoniker, url);
HttpRequestResult boardBackgroundResult = new HttpRequestGenerator( HttpRequestResult boardBackgroundResult = new HttpRequestGenerator(
PlatformEnvironment.getEnv().concatUrl("/static/images/new_aggregate_poster.png"), RequestMethod.GET).execute(); url, RequestMethod.GET).execute();
if (boardBackgroundResult.isSuccess()) { if (boardBackgroundResult.isSuccess()) {
InputStream ins = boardBackgroundResult.getResponseContentStream(); InputStream ins = boardBackgroundResult.getResponseContentStream();
BufferedImage background = ImageIO.read(ins); BufferedImage background = ImageIO.read(ins);
logger.debug("aggregate image size {}x{}", background.getWidth(), background.getHeight());
IOUtils.closeQuietly(ins); IOUtils.closeQuietly(ins);
ImageIO.write(background, "jpeg", ous); ImageIO.write(background, "jpeg", ous);
ous.flush(); ous.flush();

Loading…
Cancel
Save