aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/com/juick/JuickApplication.java
diff options
context:
space:
mode:
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() {