@whyour/qinglong 0.14.2 → 0.14.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
package/shell/update.sh
CHANGED
|
@@ -14,6 +14,7 @@ const sequelize_1 = require("sequelize");
|
|
|
14
14
|
const config_1 = __importDefault(require("../config"));
|
|
15
15
|
const cronView_1 = require("../data/cronView");
|
|
16
16
|
const env_2 = require("../data/env");
|
|
17
|
+
const system_1 = require("../data/system");
|
|
17
18
|
exports.default = async () => {
|
|
18
19
|
const cronService = typedi_1.Container.get(cron_2.default);
|
|
19
20
|
const envService = typedi_1.Container.get(env_1.default);
|
|
@@ -101,5 +102,7 @@ exports.default = async () => {
|
|
|
101
102
|
// 初始化保存一次ck和定时任务数据
|
|
102
103
|
await cronService.autosave_crontab();
|
|
103
104
|
await envService.set_envs();
|
|
105
|
+
// 初始化增加系统配置
|
|
106
|
+
await system_1.SystemModel.upsert({ type: system_1.AuthDataType.systemConfig });
|
|
104
107
|
};
|
|
105
108
|
//# sourceMappingURL=initData.js.map
|
|
@@ -223,7 +223,7 @@ let SystemService = class SystemService {
|
|
|
223
223
|
return false;
|
|
224
224
|
}
|
|
225
225
|
async updateSystem() {
|
|
226
|
-
const cp = (0, cross_spawn_1.spawn)('
|
|
226
|
+
const cp = (0, cross_spawn_1.spawn)('real_time=true ql update false', { shell: '/bin/bash' });
|
|
227
227
|
cp.stdout.on('data', (data) => {
|
|
228
228
|
this.sockService.sendMessage({
|
|
229
229
|
type: 'updateSystemVersion',
|
|
@@ -245,7 +245,7 @@ let SystemService = class SystemService {
|
|
|
245
245
|
return { code: 200 };
|
|
246
246
|
}
|
|
247
247
|
async reloadSystem(target) {
|
|
248
|
-
const cmd = `
|
|
248
|
+
const cmd = `real_time=true ql reload ${target || ''}`;
|
|
249
249
|
const cp = (0, cross_spawn_1.spawn)(cmd, { shell: '/bin/bash' });
|
|
250
250
|
cp.stdout.on('data', (data) => {
|
|
251
251
|
this.sockService.sendMessage({
|