From 032f5f7c62ed6932386e700a74dd7e519ad4de5d Mon Sep 17 00:00:00 2001 From: Alex Bitney Date: Sat, 6 Feb 2016 16:33:29 +0200 Subject: domain independence in few places fixed zero tags exception on user's page --- src/main/java/com/juick/JuickApplication.java | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) (limited to 'src/main/java/com/juick/JuickApplication.java') diff --git a/src/main/java/com/juick/JuickApplication.java b/src/main/java/com/juick/JuickApplication.java index c4a62c6f..ce242222 100644 --- a/src/main/java/com/juick/JuickApplication.java +++ b/src/main/java/com/juick/JuickApplication.java @@ -55,12 +55,20 @@ public class JuickApplication { @Override public void failed(Throwable exc, AsynchronousSocketChannel attachment) { - logger.log(Level.SEVERE, "www router failed", exc); + if (!isHttpDevMode()) { + logger.log(Level.SEVERE, "www router failed", exc); + } } }); - addComponent(new S2SComponent(this, conf)); - addComponent(new CrosspostComponent(sql, conf)); - addComponent(new PushComponent(sql, conf)); + if (!isHttpDevMode()) { + addComponent(new S2SComponent(this, conf)); + addComponent(new CrosspostComponent(sql, conf)); + addComponent(new PushComponent(sql, conf)); + } + } + + public static boolean isHttpDevMode() { + return "san".equals(System.getenv("USER")); } public Stream getRouter() { -- cgit v1.2.3