mirror of
https://github.com/whyour/qinglong.git
synced 2026-08-13 04:02:56 +08:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
66a2769e7c | ||
|
|
899a30eacd | ||
|
|
8760ac2964 | ||
|
|
62a29867a3 | ||
|
|
4938635ef4 |
@@ -71,8 +71,6 @@ task <file_path> conc <env_name> <account_number>(Optional)
|
|||||||
task <file_path> desi <env_name> <account_number>
|
task <file_path> desi <env_name> <account_number>
|
||||||
# Set task timeout
|
# Set task timeout
|
||||||
task -m <max_time> <file_path>
|
task -m <max_time> <file_path>
|
||||||
# Print task log in real time, no need to carry this parameter when creating timed tasks
|
|
||||||
task -l <file_path>
|
|
||||||
# Use -- to split, -- followed by a parameter that is passed to the script, as in the following example, the script receives the parameter -u whyour -p password
|
# Use -- to split, -- followed by a parameter that is passed to the script, as in the following example, the script receives the parameter -u whyour -p password
|
||||||
task <file_path> -- -u whyour -p password
|
task <file_path> -- -u whyour -p password
|
||||||
```
|
```
|
||||||
|
|||||||
@@ -71,8 +71,6 @@ task <file_path> conc <env_name> <account_number>(可选的)
|
|||||||
task <file_path> desi <env_name> <account_number>
|
task <file_path> desi <env_name> <account_number>
|
||||||
# 设置任务超时时间
|
# 设置任务超时时间
|
||||||
task -m <max_time> <file_path>
|
task -m <max_time> <file_path>
|
||||||
# 实时打印任务日志,创建定时任务时,不用携带此参数
|
|
||||||
task -l <file_path>
|
|
||||||
# 使用 -- 分割,-- 后面的参数会传给脚本,下面的例子,脚本就可接收到参数 -u whyour -p password
|
# 使用 -- 分割,-- 后面的参数会传给脚本,下面的例子,脚本就可接收到参数 -u whyour -p password
|
||||||
task <file_path> -- -u whyour -p password
|
task <file_path> -- -u whyour -p password
|
||||||
```
|
```
|
||||||
|
|||||||
@@ -108,8 +108,6 @@ export default async () => {
|
|||||||
fs.writeFileSync(TaskAfterFile, fs.readFileSync(sampleTaskShellFile));
|
fs.writeFileSync(TaskAfterFile, fs.readFileSync(sampleTaskShellFile));
|
||||||
}
|
}
|
||||||
|
|
||||||
dotenv.config({ path: confFile });
|
|
||||||
|
|
||||||
Logger.info('✌️ Init file down');
|
Logger.info('✌️ Init file down');
|
||||||
console.log('✌️ Init file down');
|
console.log('✌️ Init file down');
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -42,7 +42,7 @@ export default class ScriptService {
|
|||||||
|
|
||||||
public async runScript(filePath: string) {
|
public async runScript(filePath: string) {
|
||||||
const relativePath = path.relative(config.scriptPath, filePath);
|
const relativePath = path.relative(config.scriptPath, filePath);
|
||||||
const command = `${TASK_COMMAND} -l ${relativePath} now`;
|
const command = `${TASK_COMMAND} ${relativePath} now`;
|
||||||
const pid = await this.scheduleService.runTask(
|
const pid = await this.scheduleService.runTask(
|
||||||
command,
|
command,
|
||||||
this.taskCallbacks(filePath),
|
this.taskCallbacks(filePath),
|
||||||
@@ -56,7 +56,7 @@ export default class ScriptService {
|
|||||||
public async stopScript(filePath: string, pid: number) {
|
public async stopScript(filePath: string, pid: number) {
|
||||||
if (!pid) {
|
if (!pid) {
|
||||||
const relativePath = path.relative(config.scriptPath, filePath);
|
const relativePath = path.relative(config.scriptPath, filePath);
|
||||||
pid = await getPid(`${TASK_COMMAND} -l ${relativePath} now`) as number;
|
pid = await getPid(`${TASK_COMMAND} ${relativePath} now`) as number;
|
||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
await killTask(pid);
|
await killTask(pid);
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
dir_shell=/ql/shell
|
dir_shell=/ql/shell
|
||||||
|
. $dir_shell/env.sh
|
||||||
. $dir_shell/share.sh
|
. $dir_shell/share.sh
|
||||||
link_shell
|
link_shell
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,15 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
store_env_vars() {
|
||||||
|
initial_vars=($(env | cut -d= -f1))
|
||||||
|
}
|
||||||
|
|
||||||
|
restore_env_vars() {
|
||||||
|
for key in $(env | cut -d= -f1); do
|
||||||
|
if ! [[ " ${initial_vars[@]} " =~ " $key " ]]; then
|
||||||
|
unset "$key"
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
}
|
||||||
|
|
||||||
|
store_env_vars
|
||||||
+2
-2
@@ -19,7 +19,6 @@ dir_update_log=$dir_log/update
|
|||||||
ql_static_repo=$dir_repo/static
|
ql_static_repo=$dir_repo/static
|
||||||
|
|
||||||
## 文件
|
## 文件
|
||||||
file_ecosystem_js=$dir_root/ecosystem.config.js
|
|
||||||
file_config_sample=$dir_sample/config.sample.sh
|
file_config_sample=$dir_sample/config.sample.sh
|
||||||
file_env=$dir_config/env.sh
|
file_env=$dir_config/env.sh
|
||||||
file_sharecode=$dir_config/sharecode.sh
|
file_sharecode=$dir_config/sharecode.sh
|
||||||
@@ -308,8 +307,9 @@ random_range() {
|
|||||||
|
|
||||||
reload_pm2() {
|
reload_pm2() {
|
||||||
cd $dir_root
|
cd $dir_root
|
||||||
|
restore_env_vars
|
||||||
pm2 flush &>/dev/null
|
pm2 flush &>/dev/null
|
||||||
env ALL_PROXY= HTTP_PROXY= HTTPS_PROXY= all_proxy= http_proxy= https_proxy= pm2 startOrGracefulReload $file_ecosystem_js --update-env
|
pm2 startOrGracefulReload ecosystem.config.js
|
||||||
}
|
}
|
||||||
|
|
||||||
diff_time() {
|
diff_time() {
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
dir_shell=$QL_DIR/shell
|
dir_shell=$QL_DIR/shell
|
||||||
|
. $dir_shell/env.sh
|
||||||
. $dir_shell/share.sh
|
. $dir_shell/share.sh
|
||||||
. $dir_shell/api.sh
|
. $dir_shell/api.sh
|
||||||
|
|
||||||
|
|||||||
@@ -362,8 +362,13 @@ const CronDetailModal = ({
|
|||||||
<Modal
|
<Modal
|
||||||
title={
|
title={
|
||||||
<div className="crontab-title-wrapper">
|
<div className="crontab-title-wrapper">
|
||||||
<div>
|
<div style={{ minWidth: 0 }}>
|
||||||
<span>{currentCron.name}</span>
|
<Typography.Text
|
||||||
|
style={{width: '100%'}}
|
||||||
|
ellipsis={{ tooltip: currentCron.name }}
|
||||||
|
>
|
||||||
|
{currentCron.name}
|
||||||
|
</Typography.Text>
|
||||||
{currentCron.labels?.length > 0 && currentCron.labels[0] !== '' && (
|
{currentCron.labels?.length > 0 && currentCron.labels[0] !== '' && (
|
||||||
<Divider type="vertical"></Divider>
|
<Divider type="vertical"></Divider>
|
||||||
)}
|
)}
|
||||||
|
|||||||
@@ -6,9 +6,9 @@
|
|||||||
.card-wrapper {
|
.card-wrapper {
|
||||||
.ant-card:last-child {
|
.ant-card:last-child {
|
||||||
.ant-card-body {
|
.ant-card-body {
|
||||||
min-height: 300px;
|
min-height: 0;
|
||||||
height: calc(90vh - 367px);
|
height: calc(80vh - 314px);
|
||||||
height: calc(90vh - var(--vh-offset, 0px) - 367px);
|
height: calc(80vh - var(--vh-offset, 0px) - 314px);
|
||||||
overflow-y: auto;
|
overflow-y: auto;
|
||||||
|
|
||||||
> div {
|
> div {
|
||||||
@@ -21,6 +21,8 @@
|
|||||||
.ant-modal-body {
|
.ant-modal-body {
|
||||||
background: #eee;
|
background: #eee;
|
||||||
padding: 12px;
|
padding: 12px;
|
||||||
|
max-height: calc(80vh - 57px);
|
||||||
|
max-height: calc(80vh - var(--vh-offset, 57px));
|
||||||
}
|
}
|
||||||
|
|
||||||
.ant-card-body {
|
.ant-card-body {
|
||||||
|
|||||||
+5
-17
@@ -1,18 +1,6 @@
|
|||||||
version: 2.16.4
|
version: 2.16.5
|
||||||
changeLogLink: https://t.me/jiao_long/395
|
changeLogLink: https://t.me/jiao_long/396
|
||||||
publishTime: 2023-10-18 23:00
|
publishTime: 2023-10-29 20:00
|
||||||
changeLog: |
|
changeLog: |
|
||||||
1. 脚本推送增加自定义 webhook 方式
|
1. 修复注释或删除环境变量可能无效
|
||||||
3. 增加 chronocat 无头模式的QQNT推送
|
2. 修复定时任务详情日志列表样式
|
||||||
2. task 命令支持给脚本传参,使用 -- 分割,后面的参数都会传给脚本
|
|
||||||
4. 系统日志增加置顶置底按钮
|
|
||||||
5. 定时任务详情增加额外定时展示
|
|
||||||
6. 定时任务增加前后规则校验,不能包含 task 命令
|
|
||||||
7. 修复定时任务间隔较小,任务状态不准确
|
|
||||||
8. 修复定时任务日志滚动
|
|
||||||
9. 修复 QlBaseUrl 末尾不加斜杠无法访问
|
|
||||||
10. 修复定时任务详情页查看历史日志异常
|
|
||||||
11. 修复定时任务添加 task_after 命令无法停止
|
|
||||||
12. 修复清空文件夹报错
|
|
||||||
13. 修复设置代理时, schedule 服务通信异常
|
|
||||||
14. 其他优化
|
|
||||||
|
|||||||
Reference in New Issue
Block a user