更新代码和文档

This commit is contained in:
q
2026-01-03 21:11:04 +08:00
parent 48aa5b6148
commit d8f0dc4f8e
25 changed files with 789 additions and 161 deletions

View File

@@ -183,20 +183,20 @@ public class JsPlaygroundExecutor {
// 取消超时任务
timeoutTask.cancel(false);
if (error != null) {
if (error != null) {
if (error instanceof CancellationException) {
String timeoutMsg = "JavaScript执行超时超过" + EXECUTION_TIMEOUT_SECONDS + "秒),已强制中断";
playgroundLogger.errorJava(timeoutMsg);
log.error(timeoutMsg);
promise.fail(new RuntimeException(timeoutMsg));
playgroundLogger.errorJava(timeoutMsg);
log.error(timeoutMsg);
promise.fail(new RuntimeException(timeoutMsg));
} else {
Throwable cause = error.getCause();
promise.fail(cause != null ? cause : error);
}
} else {
Throwable cause = error.getCause();
promise.fail(cause != null ? cause : error);
promise.complete(result);
}
} else {
promise.complete(result);
}
});
});
return promise.future();
}
@@ -258,20 +258,20 @@ public class JsPlaygroundExecutor {
// 取消超时任务
timeoutTask.cancel(false);
if (error != null) {
if (error != null) {
if (error instanceof CancellationException) {
String timeoutMsg = "JavaScript执行超时超过" + EXECUTION_TIMEOUT_SECONDS + "秒),已强制中断";
playgroundLogger.errorJava(timeoutMsg);
log.error(timeoutMsg);
promise.fail(new RuntimeException(timeoutMsg));
playgroundLogger.errorJava(timeoutMsg);
log.error(timeoutMsg);
promise.fail(new RuntimeException(timeoutMsg));
} else {
Throwable cause = error.getCause();
promise.fail(cause != null ? cause : error);
}
} else {
Throwable cause = error.getCause();
promise.fail(cause != null ? cause : error);
promise.complete(result);
}
} else {
promise.complete(result);
}
});
});
return promise.future();
}
@@ -332,20 +332,20 @@ public class JsPlaygroundExecutor {
// 取消超时任务
timeoutTask.cancel(false);
if (error != null) {
if (error != null) {
if (error instanceof CancellationException) {
String timeoutMsg = "JavaScript执行超时超过" + EXECUTION_TIMEOUT_SECONDS + "秒),已强制中断";
playgroundLogger.errorJava(timeoutMsg);
log.error(timeoutMsg);
promise.fail(new RuntimeException(timeoutMsg));
playgroundLogger.errorJava(timeoutMsg);
log.error(timeoutMsg);
promise.fail(new RuntimeException(timeoutMsg));
} else {
Throwable cause = error.getCause();
promise.fail(cause != null ? cause : error);
}
} else {
Throwable cause = error.getCause();
promise.fail(cause != null ? cause : error);
promise.complete(result);
}
} else {
promise.complete(result);
}
});
});
return promise.future();
}

View File

@@ -29,7 +29,7 @@ import java.util.regex.Pattern;
*/
public class LzTool extends PanBase {
public static final String SHARE_URL_PREFIX = "https://wwww.lanzoum.com";
public static final String SHARE_URL_PREFIX = "https://wwwwp.lanzoup.com";
MultiMap headers0 = HeaderUtils.parseHeaders("""
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.7
Accept-Encoding: gzip, deflate