Работа над BookUpdateChecker

This commit is contained in:
Book Pauk
2022-07-26 00:41:07 +07:00
parent 52927c6188
commit e214ddf8d5
4 changed files with 93 additions and 6 deletions

View File

@@ -17,7 +17,7 @@ let instance = null;
class BUCServer {
constructor(config) {
if (!instance) {
this.config = Object.assign({}, config);
this.config = config;
//константы
if (this.config.branch !== 'development') {
@@ -52,6 +52,8 @@ class BUCServer {
this.checkQueue = [];
this.hostChecking = {};
this.main(); //no await
instance = this;
}
@@ -260,9 +262,9 @@ await this.db.insert({
for (let i = 0; i < 10; i++)
this.periodicCheck();//no await
log(`---------------------------`);
log(`Book Update checker started`);
log(`---------------------------`);
log(`------------------`);
log(`BUC Server started`);
log(`------------------`);
} catch (e) {
log(LM_FATAL, e.stack);
ayncExit.exit(1);
@@ -270,4 +272,4 @@ await this.db.insert({
}
}
module.exports = BUCServer;
module.exports = BUCServer;