build: 修改 jenkins 环境变量

This commit is contained in:
2024-03-15 17:40:11 +08:00
parent 8fdb28094d
commit 9e34dd5d54
6 changed files with 22 additions and 18 deletions

View File

@@ -11,6 +11,7 @@ import org.jetbrains.annotations.NotNull;
import redis.clients.jedis.JedisPool;
import javax.sql.DataSource;
import java.net.URI;
import java.sql.Connection;
import java.sql.SQLException;
import java.util.concurrent.ExecutorService;
@@ -50,7 +51,7 @@ public abstract class CoreAPI {
scheduledService = Executors.newScheduledThreadPool(1, new NamedThreadFactory("HamsterCore - Scheduler"));
getLogger().info("正在创建 Redis 连接池");
jedisPool = new JedisPool(config.getString("redis-url"));
jedisPool = new JedisPool(URI.create(config.getString("redis-url", "redis://localhost:6379/0?clientName=HamsterCore&timeout=5s")));
getLogger().info("Redis 连接池创建完成");
ConfigSection datasourceConfig = config.getSection("datasource");