mirror of
https://github.com/crystelf/crystelf-admin.git
synced 2026-01-29 06:37:26 +00:00
🔧 fix(lib/login/napcat): increase QR update timeout from 30s to 90s for better handling of delays
This commit is contained in:
parent
b08e83bc18
commit
2abddce9f1
@ -46,15 +46,19 @@ export default class NapcatService {
|
||||
if (!fs.existsSync(shFile)) {
|
||||
const scriptContent = `#!/bin/bash\nxvfb-run -a qq --no-sandbox -q ${qq}\n`;
|
||||
fs.writeFileSync(shFile, scriptContent, { mode: 0o755 });
|
||||
logger.info(`[crystelf-admin] 写入运行脚本,:${qq}.sh`);
|
||||
}
|
||||
try {
|
||||
await execAsync(`tmux has-session -t ${nickname}`);
|
||||
// 存在就先干掉
|
||||
logger.info('[crystelf-admin] 存在会话,将停止会话')
|
||||
await execAsync(`tmux kill-session -t ${nickname}`);
|
||||
await execAsync(`tmux new -s ${nickname} -d "bash '${shFile}'"`);
|
||||
logger.info('[crystelf-admin] 新建会话');
|
||||
} catch {
|
||||
// 不存在再新建
|
||||
await execAsync(`tmux new -s ${nickname} -d "bash '${shFile}'"`);
|
||||
logger.info('[crystelf-admin] 新建会话');
|
||||
}
|
||||
|
||||
return await this.waitForQrUpdate();
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user