diff --git a/src/server/database/MariaDB.js b/src/server/database/MariaDB.js index 4a8e7bf..4ef0be6 100644 --- a/src/server/database/MariaDB.js +++ b/src/server/database/MariaDB.js @@ -14,6 +14,7 @@ class MariaDB { if (!config) Util.fatal(new Error('No config options provided!')); + this.load = config.options.load; this.config = config; const { MARIA_HOST: hostStr, MARIA_USER: user, MARIA_PORT: port, MARIA_PASS: password, MARIA_DB: database } = config; const hosts = hostStr.split(','); @@ -36,6 +37,10 @@ class MariaDB { async init () { + if (!this.load) { + this.logger.info(`Not loading MariaDB connection`); + return; + } this.logger.status(`Creating${this._cluster ? ' cluster' : ''} connection pool`); if (this._cluster) { this.pool = mysql.createPoolCluster(this.config.options.cluster);