支持彩色编译信息输出

This commit is contained in:
undefined committed 2020-06-18 13:14:39 +08:00
1 parent f293e1f59e
commit d040b153a1
18 files changed
+130 -59

No files matched your search

+6 -5
View File
@@ -4,7 +4,7 @@ const os = require('os');
const fs = require('fs');
const path = require('path');
const {
lib, service, model, config,
lib, service, model, setting,
builtinLib, builtinHandler, builtinModel,
} = require('./common');
@@ -61,13 +61,14 @@ async function load(call) {
await global.Hydro.model[m].ensureIndexes();
}
}
const system = require('../model/system');
const dbVer = await system.get('db.ver');
const modelSystem = require('../model/system');
const modelSetting = require('../model/setting');
const dbVer = await modelSystem.get('db.ver');
if (dbVer !== 1) {
const ins = require('../script/install');
await ins.run({ username: 'Root', password: 'rootroot' });
}
await config(pending, fail);
await setting(pending, fail, modelSetting, modelSystem);
for (const i in global.Hydro.service) {
if (global.Hydro.service[i].postInit) {
try {
@@ -78,7 +79,7 @@ async function load(call) {
}
}
pending = [];
return { fail, active };
return await modelSystem.get('server.worker');
}
module.exports = load;