= Fixed 'send immediate'
This commit is contained in:
@@ -86,6 +86,8 @@ PollVoteNotValidVote=%s That's not a vaild vote!
|
|||||||
PollVoteSuccess=You successfully voted for
|
PollVoteSuccess=You successfully voted for
|
||||||
|
|
||||||
[CommandShutdown]
|
[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.
|
ShutdownInfo=Stops kitty. `-s` or `safe` as an argument attempts to sync off the database before shutdown.
|
||||||
|
|
||||||
[CommandTeey]
|
[CommandTeey]
|
||||||
|
|||||||
@@ -41,16 +41,21 @@ public class CommandShutdown extends Command
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if(isSafe)
|
if(isSafe)
|
||||||
{
|
{
|
||||||
// Force upkeep, this works so long as upkeep is on the main thread.
|
// Force upkeep, this works so long as upkeep is on the main thread.
|
||||||
|
res.CallImmediate(LocStrings.Stub("ShutdownSafe"));
|
||||||
DatabaseManager.instance.Upkeep();
|
DatabaseManager.instance.Upkeep();
|
||||||
GlobalLog.Error(LogFilter.Command, "Forced shutdown, database synced before abandoning threads.");
|
GlobalLog.Warn(LogFilter.Command, LocStrings.Lookup("ShutdownSafe"));
|
||||||
|
|
||||||
System.exit(0);
|
System.exit(0);
|
||||||
}
|
}
|
||||||
else
|
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);
|
System.exit(0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -61,7 +61,7 @@ public class Response
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
event.getChannel().sendMessage(toRespondWith);
|
event.getChannel().sendMessage(toRespondWith).complete();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user