@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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@whyour/qinglong",
3
- "version": "0.14.2",
3
+ "version": "0.14.3",
4
4
  "description": "Timed task management platform supporting Python3, JavaScript, Shell, Typescript",
5
5
  "repository": {
6
6
  "type": "git",
package/shell/update.sh CHANGED
@@ -476,6 +476,9 @@ main() {
476
476
  if [[ "$no_tee" == "true" ]]; then
477
477
  cmd=">> $file_path 2>&1"
478
478
  fi
479
+ if [[ "$real_time" == "true" ]]; then
480
+ cmd=""
481
+ fi
479
482
 
480
483
  local time_format="%Y-%m-%d %H:%M:%S"
481
484
  local time=$(date "+$time_format")
@@ -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)('no_tee=true ql update false', { shell: '/bin/bash' });
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 = `no_tee=true ql reload ${target || ''}`;
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({