Add --disable_news_feed option to disable News Feed (#3246)

This commit is contained in:
Naoki Takezoe
2023-02-27 02:17:52 +09:00
committed by GitHub
parent 1e752af41b
commit f472d52954
10 changed files with 93 additions and 50 deletions

View File

@@ -65,9 +65,15 @@ public class JettyLauncher {
boolean saveSessions = false;
for(String arg: args) {
if(arg.equals("--save_sessions")) {
if (arg.equals("--save_sessions")) {
saveSessions = true;
}
if (arg.equals("--disable_news_feed")) {
System.setProperty("gitbucket.disableNewsFeed", "true");
}
if (arg.equals("--disable_cache")) {
System.setProperty("gitbucket.disableCache", "true");
}
if(arg.startsWith("--") && arg.contains("=")) {
String[] dim = arg.split("=", 2);
if(dim.length == 2) {
@@ -111,9 +117,6 @@ public class JettyLauncher {
case "--jetty_idle_timeout":
jettyIdleTimeout = dim[1];
break;
case "--disable_cache":
System.setProperty("gitbucket.disableCache", dim[1]);
break;
}
}
}