diff options
author | Alex Bitney | 2016-02-06 16:33:29 +0200 |
---|---|---|
committer | Alex Bitney | 2016-02-06 16:33:29 +0200 |
commit | 032f5f7c62ed6932386e700a74dd7e519ad4de5d (patch) | |
tree | dd960cb1265c5b63a1eaccd091cb984b28a177d5 /src/main/java/com/juick/JuickApplication.java | |
parent | bb93adcf1414001ec3e8439e9440547d52cc8e1d (diff) |
domain independence in few places
fixed zero tags exception on user's page
Diffstat (limited to 'src/main/java/com/juick/JuickApplication.java')
-rw-r--r-- | src/main/java/com/juick/JuickApplication.java | 16 |
1 files changed, 12 insertions, 4 deletions
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() { |