mirror of
https://github.com/whyour/qinglong.git
synced 2025-05-23 06:46:09 +08:00
修复typescript类型错误
This commit is contained in:
parent
d2590edab3
commit
529880642f
|
@ -325,16 +325,10 @@ export default class CronService {
|
||||||
|
|
||||||
cp.on('exit', async (code, signal) => {
|
cp.on('exit', async (code, signal) => {
|
||||||
this.logger.info(
|
this.logger.info(
|
||||||
`${command} pid: ${cp.pid} exit ${code} signal ${signal}`,
|
`任务 ${command} 进程id: ${cp.pid} 退出,退出码 ${code}`,
|
||||||
);
|
);
|
||||||
await CrontabModel.update(
|
|
||||||
{ status: CrontabStatus.idle, pid: undefined },
|
|
||||||
{ where: { id } },
|
|
||||||
);
|
|
||||||
resolve();
|
|
||||||
});
|
});
|
||||||
cp.on('close', async (code) => {
|
cp.on('close', async (code) => {
|
||||||
this.logger.info(`${command} pid: ${cp.pid} closed ${code}`);
|
|
||||||
await CrontabModel.update(
|
await CrontabModel.update(
|
||||||
{ status: CrontabStatus.idle, pid: undefined },
|
{ status: CrontabStatus.idle, pid: undefined },
|
||||||
{ where: { id } },
|
{ where: { id } },
|
||||||
|
|
|
@ -245,7 +245,7 @@ export default class NotificationService {
|
||||||
const [corpid, corpsecret, touser, agentid, thumb_media_id = '1'] =
|
const [corpid, corpsecret, touser, agentid, thumb_media_id = '1'] =
|
||||||
weWorkAppKey.split(',');
|
weWorkAppKey.split(',');
|
||||||
const url = `https://qyapi.weixin.qq.com/cgi-bin/gettoken`;
|
const url = `https://qyapi.weixin.qq.com/cgi-bin/gettoken`;
|
||||||
const { access_token } = await got
|
const tokenRes: any = await got
|
||||||
.post(url, {
|
.post(url, {
|
||||||
timeout: this.timeout,
|
timeout: this.timeout,
|
||||||
retry: 0,
|
retry: 0,
|
||||||
|
@ -296,7 +296,7 @@ export default class NotificationService {
|
||||||
|
|
||||||
const res: any = await got
|
const res: any = await got
|
||||||
.post(
|
.post(
|
||||||
`https://qyapi.weixin.qq.com/cgi-bin/message/send?access_token=${access_token}`,
|
`https://qyapi.weixin.qq.com/cgi-bin/message/send?access_token=${tokenRes.access_token}`,
|
||||||
{
|
{
|
||||||
timeout: this.timeout,
|
timeout: this.timeout,
|
||||||
retry: 0,
|
retry: 0,
|
||||||
|
|
|
@ -79,13 +79,12 @@ export default class ScheduleService {
|
||||||
|
|
||||||
cp.on('exit', async (code, signal) => {
|
cp.on('exit', async (code, signal) => {
|
||||||
this.logger.info(
|
this.logger.info(
|
||||||
`${command} pid: ${cp.pid} exit ${code} signal ${signal}`,
|
`任务 ${command} 进程id: ${cp.pid} 退出,退出码 ${code}`,
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
|
||||||
cp.on('close', async (code) => {
|
cp.on('close', async (code) => {
|
||||||
const endTime = dayjs();
|
const endTime = dayjs();
|
||||||
this.logger.info(`${command} pid: ${cp.pid} closed ${code}`);
|
|
||||||
await callbacks.onEnd?.(
|
await callbacks.onEnd?.(
|
||||||
cp,
|
cp,
|
||||||
endTime,
|
endTime,
|
||||||
|
|
|
@ -117,6 +117,7 @@
|
||||||
"react-split-pane": "^0.1.92",
|
"react-split-pane": "^0.1.92",
|
||||||
"sockjs-client": "^1.6.0",
|
"sockjs-client": "^1.6.0",
|
||||||
"ts-node": "^10.6.0",
|
"ts-node": "^10.6.0",
|
||||||
|
"tslib": "^2.4.0",
|
||||||
"typescript": "^4.6.2",
|
"typescript": "^4.6.2",
|
||||||
"umi": "^3.5.21",
|
"umi": "^3.5.21",
|
||||||
"umi-request": "^1.4.0",
|
"umi-request": "^1.4.0",
|
||||||
|
|
Loading…
Reference in New Issue
Block a user