mirror of
https://github.com/whyour/qinglong.git
synced 2026-06-30 20:35:09 +08:00
修复 nginx 转发stream接口失效,停止运行命令支持 pid 参数
This commit is contained in:
+5
-1
@@ -170,6 +170,9 @@ export default (app: Router) => {
|
||||
await systemService.run(
|
||||
{ ...req.body, logPath },
|
||||
{
|
||||
onStart: async (cp, startTime) => {
|
||||
res.setHeader('QL-Task-Pid', `${cp.pid}`);
|
||||
},
|
||||
onEnd: async (cp, endTime, diff) => {
|
||||
res.end();
|
||||
},
|
||||
@@ -195,7 +198,8 @@ export default (app: Router) => {
|
||||
'/command-stop',
|
||||
celebrate({
|
||||
body: Joi.object({
|
||||
command: Joi.string().required(),
|
||||
command: Joi.string().optional(),
|
||||
pid: Joi.number().optional(),
|
||||
}),
|
||||
}),
|
||||
async (req: Request, res: Response, next: NextFunction) => {
|
||||
|
||||
Reference in New Issue
Block a user