佛系的一天

This commit is contained in:
DESKTOP-5RP3AKU\Jisol
2023-11-24 01:38:58 +08:00
parent f129aed752
commit 8e644c583c
4 changed files with 15 additions and 7 deletions

View File

@@ -32,6 +32,11 @@ public class GRefereeAction {
//最大裁决员数量
public static int MAX = 10;
//headless位置
// public static String Headless = "D:\\myproject\\JisolGame\\headless";
public static String Headless = "D:\\Jisol\\JisolGame\\headless";
// public static String Headless = "D:\\wwwroot\\pet.jisol.cn\\headless";
//获取一个空闲的裁决员
public static GRefereeClient getFreeReferee(){
@@ -77,13 +82,15 @@ public class GRefereeAction {
//生成客户端Id
String uuid = IdUtil.simpleUUID();
//创建日志类
Logger log = JLoggerUtil.file(uuid, "D:\\myproject\\JisolGame\\headless\\logger", uuid + ".log");
Logger log = JLoggerUtil.file(uuid, Headless+"\\logger", uuid + ".log");
if(Objects.isNull(log)) return;
log.setUseParentHandlers(false);
Thread thread = new Thread(() -> {
try {
Process process = Runtime.getRuntime().exec("cmd /c npm run main", null, new File("D:\\myproject\\JisolGame\\headless"));
Process process = Runtime.getRuntime().exec("cmd /c npm run main", null, new File(Headless));
InputStream is = process.getInputStream();
InputStreamReader isr = new InputStreamReader(is);
BufferedReader br = new BufferedReader(isr);