mirror of
https://github.com/whyour/qinglong.git
synced 2026-06-13 06:16:12 +08:00
修复获取定时任务参数
This commit is contained in:
parent
d1dfde3ca9
commit
7d8feadc78
|
|
@ -437,7 +437,7 @@ export async function killTask(pid: number) {
|
|||
[pid, ...pids].reverse().forEach((x) => {
|
||||
process.kill(x, 15);
|
||||
});
|
||||
} catch (error) {}
|
||||
} catch (error) { }
|
||||
} else {
|
||||
process.kill(pid, 2);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -233,7 +233,7 @@ export default async () => {
|
|||
const lang = systemConfig.info?.lang || 'zh';
|
||||
await writeFile(config.langEnvFile, `export QL_LANG='${lang}'\n`);
|
||||
}
|
||||
} catch {}
|
||||
} catch { }
|
||||
setLang(systemConfig.info?.lang || 'zh');
|
||||
|
||||
await envService.set_envs();
|
||||
|
|
|
|||
|
|
@ -42,13 +42,11 @@ export default class SshKeyService {
|
|||
key: string,
|
||||
): Promise<void> {
|
||||
try {
|
||||
await writeFileWithLock(
|
||||
path.join(this.sshPath, alias),
|
||||
`${key}${os.EOL}`,
|
||||
{
|
||||
mode: '400',
|
||||
},
|
||||
);
|
||||
const filePath = path.join(this.sshPath, alias);
|
||||
try {
|
||||
await rmPath(filePath);
|
||||
} catch { }
|
||||
await writeFileWithLock(filePath, `${key}${os.EOL}`, { mode: '400' });
|
||||
} catch (error) {
|
||||
this.logger.error('生成私钥文件失败', error);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -367,7 +367,7 @@ const Crontab = () => {
|
|||
|
||||
const getCrons = async (silent?: boolean) => {
|
||||
if (!silent) setLoading(true);
|
||||
const { page, size, sorter, filters } = pageConf;
|
||||
const { page = 1, size = 10, sorter, filters = '{}' } = pageConf;
|
||||
let url = `${config.apiPrefix
|
||||
}crons?searchValue=${searchText}&page=${page}&size=${size}&filters=${JSON.stringify(
|
||||
filters,
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user