增加错误处理以确保读取剩余时间文件时的稳定性;新增初始化脚本以支持项目启动
This commit is contained in:
@@ -37,8 +37,12 @@ export const notify = (content: string) => {
|
||||
console.log(message);
|
||||
}
|
||||
export const notifyJob = () => {
|
||||
const content = fs.readFileSync(path.join(__dirname, `storage/${groupId}_remains.txt`), 'utf-8');
|
||||
notify(content);
|
||||
try {
|
||||
const content = fs.readFileSync(path.join(__dirname, `storage/${groupId}_remains.txt`), 'utf-8');
|
||||
notify(content);
|
||||
} catch (error) {
|
||||
console.error('Failed to read remains file:');
|
||||
}
|
||||
}
|
||||
|
||||
const isPm2 = process.env.PM2_HOME !== undefined;
|
||||
|
||||
8
minimax/listen-cost/readme.md
Normal file
8
minimax/listen-cost/readme.md
Normal file
@@ -0,0 +1,8 @@
|
||||
# 监听minimax的剩余时间,定时通知群里
|
||||
|
||||
## 说明
|
||||
|
||||
环境变量
|
||||
|
||||
- `MINIMAX_COOKIE`
|
||||
- `MINIMAX_GROUP_ID`
|
||||
8
xiaoxiongmao/init.ts
Normal file
8
xiaoxiongmao/init.ts
Normal file
@@ -0,0 +1,8 @@
|
||||
const startList = [
|
||||
{
|
||||
cmd: 'bun /workspace/openclaw/skills/cnb-dev-sync/scripts/sync.ts all'
|
||||
},
|
||||
{
|
||||
cmd:"cd /workspace/skills/minimax/listen-cost && pnpm pm2"
|
||||
}
|
||||
]
|
||||
Reference in New Issue
Block a user