Поправки багов
This commit is contained in:
@@ -153,11 +153,11 @@ class FileLog extends BaseLog {
|
||||
}, LOG_ROTATE_FILE_CHECK_INTERVAL);
|
||||
};
|
||||
|
||||
await fs.writeAsync(this.fd, new Buffer(data.join('')));
|
||||
await fs.writeAsync(this.fd, Buffer.from(data.join('')));
|
||||
}
|
||||
|
||||
flushImplSync(data) {
|
||||
fs.writeSync(this.fd, new Buffer(data.join('')));
|
||||
fs.writeSync(this.fd, Buffer.from(data.join('')));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -6,15 +6,16 @@ const waitingDelay = 100; //ms
|
||||
|
||||
class SqliteConnectionPool {
|
||||
constructor(connCount, logger, config) {
|
||||
this.config = config;
|
||||
this.connCount = connCount;
|
||||
this.logger = logger;
|
||||
this.config = config;
|
||||
}
|
||||
|
||||
async init() {
|
||||
this.logger.log('Opening database');
|
||||
|
||||
utils.mkDirIfNotExistsSync(config.dataDir);
|
||||
const dbFileName = config.dataDir + '/' + config.dbFileName;
|
||||
utils.mkDirIfNotExistsSync(this.config.dataDir);
|
||||
const dbFileName = this.config.dataDir + '/' + this.config.dbFileName;
|
||||
|
||||
this.connections = [];
|
||||
this.taken = new Set();
|
||||
|
||||
@@ -13,7 +13,6 @@ function statPathSync(path) {
|
||||
}
|
||||
|
||||
function mkDirIfNotExistsSync(path) {
|
||||
console.log(path);
|
||||
let exists = statPathSync(path);
|
||||
if (!exists) {
|
||||
fs.mkdirSync(path, {recursive: true, mode: 0o755});
|
||||
|
||||
Reference in New Issue
Block a user