feat: optimize code

This commit is contained in:
tjq 2023-01-27 13:05:35 +08:00
parent 54beb3b2d1
commit fb2046649e
3 changed files with 3 additions and 7 deletions

View File

@ -11,5 +11,5 @@ ${AnsiColor.BRIGHT_RED}
* Maintainer: tengjiqi@gmail.com & Team PowerJob
* OfficialWebsite: http://www.powerjob.tech/
* SourceCode: https://github.com/PowerJob/PowerJob
* PoweredBy: SpringBoot${spring-boot.formatted-version} & Akka (v2.6.12) & Vert.x (v4.0.2)
* PoweredBy: SpringBoot${spring-boot.formatted-version}
${AnsiColor.DEFAULT}

View File

@ -68,11 +68,7 @@ public class PowerJobWorker {
log.info("[PowerJobWorker] start to initialize PowerJobWorker...");
PowerJobWorkerConfig config = workerRuntime.getWorkerConfig();
// 打印 worker 配置
log.info("[PowerJobWorker] worker config: {}", JsonUtils.toJSONString(config));
CommonUtils.requireNonNull(config, "can't find OhMyConfig, please set OhMyConfig first");
CommonUtils.requireNonNull(config, "can't find PowerJobWorkerConfig, please set PowerJobWorkerConfig first");
try {
PowerBannerPrinter.print();

View File

@ -108,7 +108,7 @@ public class LightTaskTracker extends TaskTracker {
// 提交任务到线程池
processFuture = workerRuntime.getExecutorManager().getLightweightTaskExecutorService().submit(this::processTask);
} catch (Exception e) {
log.warn("[TaskTracker-{}] fail to create TaskTracker for req:{} ", instanceId, req);
log.error("[TaskTracker-{}] fail to create TaskTracker for req:{} ", instanceId, req);
destroy();
throw e;
}