mirror of
https://github.com/Eyre-S/Coeur-Morny-Cono.git
synced 2024-11-25 20:47:38 +08:00
为启动线程添加了 morny-init 节点,修改线程名,添加事件监听启动的log
- 为事件监听器的注册和开启添加一条 log 记录 - 在 ServerMain 交接启动给 MornyCoeur 时将启动线程名切换为 <morny-init> - 将 exit-cleaning 线程名改为小写
This commit is contained in:
parent
8b41111a49
commit
c63217f0c6
@ -1,6 +1,6 @@
|
|||||||
## Core
|
## Core
|
||||||
|
|
||||||
VERSION = 0.7.1.0
|
VERSION = 0.7.1.1
|
||||||
|
|
||||||
CODENAME = fuzhou
|
CODENAME = fuzhou
|
||||||
|
|
||||||
|
@ -4,7 +4,7 @@ package cc.sukazyo.cono.morny;
|
|||||||
* the final field that will be updated by gradle automatically.
|
* the final field that will be updated by gradle automatically.
|
||||||
*/
|
*/
|
||||||
public class GradleProjectConfigures {
|
public class GradleProjectConfigures {
|
||||||
public static final String VERSION = "0.7.1.0";
|
public static final String VERSION = "0.7.1.1";
|
||||||
public static final String CODENAME = "fuzhou";
|
public static final String CODENAME = "fuzhou";
|
||||||
public static final long COMPILE_TIMESTAMP = 1654235503515L;
|
public static final long COMPILE_TIMESTAMP = 1654430498871L;
|
||||||
}
|
}
|
||||||
|
@ -152,6 +152,7 @@ public class MornyCoeur {
|
|||||||
isRemoveCommandListWhenExit
|
isRemoveCommandListWhenExit
|
||||||
);
|
);
|
||||||
MornyDaemons.start();
|
MornyDaemons.start();
|
||||||
|
logger.info("start telegram events listening");
|
||||||
EventListeners.registerAllListeners();
|
EventListeners.registerAllListeners();
|
||||||
INSTANCE.account.setUpdatesListener(OnUpdate::onNormalUpdate);
|
INSTANCE.account.setUpdatesListener(OnUpdate::onNormalUpdate);
|
||||||
if (isAutomaticResetCommandList) {
|
if (isAutomaticResetCommandList) {
|
||||||
@ -187,7 +188,7 @@ public class MornyCoeur {
|
|||||||
* 为程序在虚拟机上添加退出钩子
|
* 为程序在虚拟机上添加退出钩子
|
||||||
*/
|
*/
|
||||||
private void configureSafeExit () {
|
private void configureSafeExit () {
|
||||||
Runtime.getRuntime().addShutdownHook(new Thread(this::exitCleanup, "Exit-Cleaning"));
|
Runtime.getRuntime().addShutdownHook(new Thread(this::exitCleanup, "exit-cleaning"));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -21,6 +21,8 @@ public class ServerMain {
|
|||||||
public static final String PROP_TOKEN_KEY = "TELEGRAM_BOT_API_TOKEN";
|
public static final String PROP_TOKEN_KEY = "TELEGRAM_BOT_API_TOKEN";
|
||||||
public static final String PROP_TOKEN_MORNY_KEY = "MORNY_TG_TOKEN";
|
public static final String PROP_TOKEN_MORNY_KEY = "MORNY_TG_TOKEN";
|
||||||
|
|
||||||
|
private static final String THREAD_MORNY_INIT = "morny-init";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 程序入口,也是参数处理器<br>
|
* 程序入口,也是参数处理器<br>
|
||||||
* <br>
|
* <br>
|
||||||
@ -233,6 +235,7 @@ public class ServerMain {
|
|||||||
logger.info("Parameter required has no value:\n --token.");
|
logger.info("Parameter required has no value:\n --token.");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
Thread.currentThread().setName(THREAD_MORNY_INIT);
|
||||||
MornyCoeur.main(
|
MornyCoeur.main(
|
||||||
api, api4File,
|
api, api4File,
|
||||||
key, username,
|
key, username,
|
||||||
|
Loading…
Reference in New Issue
Block a user