= Fixed 'send immediate'

This commit is contained in:
Matthew Cech
2019-05-05 16:34:32 -07:00
parent 40d4812e2a
commit 55411cfe14
3 changed files with 11 additions and 4 deletions
+3 -1
View File
@@ -86,6 +86,8 @@ PollVoteNotValidVote=%s That's not a vaild vote!
PollVoteSuccess=You successfully voted for
[CommandShutdown]
ShutdownSafe=Shutting down, but first syncing database and finishing current threads.
ShutdownUnsafe=Shutting down and immediately and abandoning all threads without sync.
ShutdownInfo=Stops kitty. `-s` or `safe` as an argument attempts to sync off the database before shutdown.
[CommandTeey]
@@ -218,4 +220,4 @@ MapVersion=Using mapgen v0.1
MapWidth=Width
MapHeight=Height
+7 -2
View File
@@ -41,16 +41,21 @@ public class CommandShutdown extends Command
break;
}
if(isSafe)
{
// Force upkeep, this works so long as upkeep is on the main thread.
res.CallImmediate(LocStrings.Stub("ShutdownSafe"));
DatabaseManager.instance.Upkeep();
GlobalLog.Error(LogFilter.Command, "Forced shutdown, database synced before abandoning threads.");
GlobalLog.Warn(LogFilter.Command, LocStrings.Lookup("ShutdownSafe"));
System.exit(0);
}
else
{
GlobalLog.Error(LogFilter.Command, "Forced immediate shutdown, threads abandoned without sync.");
res.CallImmediate(LocStrings.Stub("ShutdownUnsafe"));// "`Shutting down and immediately and abandoning all threads without sync.`");
GlobalLog.Warn(LogFilter.Command, LocStrings.Lookup("ShutdownSafe"));
System.exit(0);
}
}
+1 -1
View File
@@ -61,7 +61,7 @@ public class Response
}
else
{
event.getChannel().sendMessage(toRespondWith);
event.getChannel().sendMessage(toRespondWith).complete();
}
}