Skip to content

Commit

Permalink
GH-48 Add hidden gc command (Resolve #48)
Browse files Browse the repository at this point in the history
  • Loading branch information
dzikoysk committed May 16, 2020
1 parent ba25882 commit 99e8bde
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ public void hook() {
consoleThread.start();
}

// TODO
public boolean execute(String command) {
if (command.trim().isEmpty()) {
return false;
Expand All @@ -49,6 +48,10 @@ public boolean execute(String command) {
return new PurgeCommand().call(nanoMaven);
case "tokens":
return new TokensListCommand().call(nanoMaven);
case "gc":
NanoMaven.getLogger().info("[Utility Command] Called gc");
System.gc();
return true;
case "stop":
nanoMaven.shutdown();
break;
Expand Down

0 comments on commit 99e8bde

Please sign in to comment.