aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/com/juick/JuickApplication.java
diff options
context:
space:
mode:
authorGravatar Alex Bitney2016-02-06 16:33:29 +0200
committerGravatar Alex Bitney2016-02-06 16:33:29 +0200
commit032f5f7c62ed6932386e700a74dd7e519ad4de5d (patch)
treedd960cb1265c5b63a1eaccd091cb984b28a177d5 /src/main/java/com/juick/JuickApplication.java
parentbb93adcf1414001ec3e8439e9440547d52cc8e1d (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.java16
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() {