@whyour/qinglong 0.19.3 → 0.19.5

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.19.3",
3
+ "version": "0.19.5",
4
4
  "description": "Timed task management platform supporting Python3, JavaScript, Shell, Typescript",
5
5
  "repository": {
6
6
  "type": "git",
package/shell/start.sh CHANGED
@@ -16,14 +16,14 @@ if [[ ! $QL_DIR ]]; then
16
16
  fi
17
17
 
18
18
  if [[ $QL_DIR ]]; then
19
- echo -e "请先设置 export QL_DIR=$QL_DIR,环境变量,并添加到系统环境变量,然后再次执行命令 qinglong 启动服务"
19
+ echo -e "请先手动设置 export QL_DIR=$QL_DIR,环境变量,并手动添加到系统环境变量,然后再次执行命令 qinglong 启动服务"
20
20
  fi
21
21
 
22
22
  exit 1
23
23
  fi
24
24
 
25
25
  if [[ ! $QL_DATA_DIR ]]; then
26
- echo -e "请先设置数据存储目录 export QL_DATA_DIR 环境变量,目录必须以斜杠开头的绝对路径,并添加到系统环境变量"
26
+ echo -e "请先手动设置数据存储目录 export QL_DATA_DIR 环境变量,目录必须以斜杠开头的绝对路径,并手动添加到系统环境变量"
27
27
  exit 1
28
28
  fi
29
29
 
@@ -56,8 +56,7 @@ else
56
56
  exit 1
57
57
  fi
58
58
 
59
- npm install -g pnpm@8.3.1
60
- pnpm add -g pm2 tsx
59
+ npm install -g pnpm@8.3.1 pm2 tsx
61
60
 
62
61
  cd ${QL_DIR}
63
62
  cp -f .env.example .env
@@ -66,6 +65,7 @@ chmod 777 ${QL_DIR}/shell/*.sh
66
65
  . ${QL_DIR}/shell/env.sh
67
66
  . ${QL_DIR}/shell/share.sh
68
67
 
68
+ echo -e "======================1. 检测配置文件========================\n"
69
69
  make_dir /etc/nginx/conf.d
70
70
  make_dir /run/nginx
71
71
  init_nginx
@@ -73,16 +73,28 @@ fix_config
73
73
 
74
74
  pm2 l &>/dev/null
75
75
 
76
+ echo -e "======================2. 安装依赖========================\n"
76
77
  patch_version
77
78
 
78
- reload_pm2
79
-
79
+ echo -e "======================3. 启动nginx========================\n"
80
80
  nginx -s reload 2>/dev/null || nginx -c /etc/nginx/nginx.conf
81
+ echo -e "nginx启动成功...\n"
82
+
83
+ reload_update
84
+ reload_pm2
81
85
 
82
86
  if [[ $AutoStartBot == true ]]; then
83
- nohup ql -l bot >$dir_log/bot.log 2>&1 &
87
+ echo -e "======================5. 启动bot========================\n"
88
+ nohup ql bot >$dir_log/bot.log 2>&1 &
89
+ echo -e "bot后台启动中...\n"
84
90
  fi
85
91
 
86
92
  if [[ $EnableExtraShell == true ]]; then
87
- nohup ql -l extra >$dir_log/extra.log 2>&1 &
93
+ echo -e "====================6. 执行自定义脚本========================\n"
94
+ nohup ql extra >$dir_log/extra.log 2>&1 &
95
+ echo -e "自定义脚本后台执行中...\n"
88
96
  fi
97
+
98
+ echo -e "############################################################\n"
99
+ echo -e "启动完成..."
100
+ echo -e "############################################################\n"
@@ -95,9 +95,9 @@ let SubscriptionService = class SubscriptionService {
95
95
  throw error;
96
96
  }
97
97
  }
98
- async handleTask(_doc, needCreate = true, runImmediately = false) {
99
- const { url } = (0, subscription_2.formatUrl)(_doc);
100
- const doc = Object.assign(Object.assign({}, _doc), { command: (0, subscription_2.formatCommand)(_doc, url) });
98
+ async handleTask(doc, needCreate = true, runImmediately = false) {
99
+ const { url } = (0, subscription_2.formatUrl)(doc);
100
+ doc.command = (0, subscription_2.formatCommand)(doc, url);
101
101
  if (doc.schedule_type === 'crontab') {
102
102
  this.scheduleService.cancelCronTask(doc);
103
103
  needCreate &&