Support missing config options
This commit is contained in:
parent
1ad3813c73
commit
7227496c1c
@ -51,7 +51,7 @@ public class EffExecuteStatement extends Effect {
|
|||||||
static String lastError;
|
static String lastError;
|
||||||
|
|
||||||
private static final ExecutorService threadPool =
|
private static final ExecutorService threadPool =
|
||||||
Executors.newFixedThreadPool(SkriptDB.getInstance().getConfig().getInt("thread-pool-size"));
|
Executors.newFixedThreadPool(SkriptDB.getInstance().getConfig().getInt("thread-pool-size", 2));
|
||||||
|
|
||||||
private Expression<String> query;
|
private Expression<String> query;
|
||||||
private Expression<HikariDataSource> dataSource;
|
private Expression<HikariDataSource> dataSource;
|
||||||
|
@ -59,7 +59,7 @@ public class ExprDataSource extends SimpleExpression<HikariDataSource> {
|
|||||||
HikariDataSource ds = new HikariDataSource();
|
HikariDataSource ds = new HikariDataSource();
|
||||||
|
|
||||||
//allow specifying of own sql driver class name
|
//allow specifying of own sql driver class name
|
||||||
if (!SkriptDB.getInstance().getConfig().getString("sql-driver-class-name").equals("default")) {
|
if (!SkriptDB.getInstance().getConfig().getString("sql-driver-class-name", "default").equals("default")) {
|
||||||
ds.setDriverClassName(SkriptDB.getInstance().getConfig().getString("sql-driver-class-name"));
|
ds.setDriverClassName(SkriptDB.getInstance().getConfig().getString("sql-driver-class-name"));
|
||||||
}
|
}
|
||||||
ds.setJdbcUrl(jdbcUrl);
|
ds.setJdbcUrl(jdbcUrl);
|
||||||
|
Loading…
Reference in New Issue
Block a user