修正消息路由回定稿策略: 登录失效+日报发群, 隧道/风控发私聊; 修正误导性日志文案

This commit is contained in:
hermes
2026-08-27 02:08:16 +00:00
parent c4a6a4d596
commit 3ab4a3f82c
2 changed files with 5 additions and 5 deletions
+4 -4
View File
@@ -20,9 +20,9 @@ const DB = process.env.RECRUITMENT_DB || '/opt/data/recruitment-data/recruitment
const SCRIPTS = '/opt/data/skills/recruitment-resume-screener/scripts'; const SCRIPTS = '/opt/data/skills/recruitment-resume-screener/scripts';
const STATE_DIR = '/opt/data/logs/recruitment/state'; const STATE_DIR = '/opt/data/logs/recruitment/state';
const STOP_FLAG = path.join(STATE_DIR, 'STOP.flag'); const STOP_FLAG = path.join(STATE_DIR, 'STOP.flag');
// 2026-08-26 修正:用户明确反馈"串台",一切通知(日报/登录失效/隧道/风控)只发私聊,禁止发群 // 消息策略(2026-08-26 用户定稿):登录失效+每日日报 → 群(数字HR);隧道失败/风控 → 私聊
const GROUP = 'oc_d09c77b62ca5f90f6699830fbc695c44'; // (历史变量名,实际=私聊目标) const GROUP = 'oc_7ef4980f25ec2a80bb013d5dd79b9864'; // 群:登录失效告警 + 每日日报
const DM = 'oc_d09c77b62ca5f90f6699830fbc695c44'; // 私聊:所有通知 const DM = 'oc_d09c77b62ca5f90f6699830fbc695c44'; // 私聊:隧道/风控异常
const HERMES = '/opt/hermes/.venv/bin/hermes'; const HERMES = '/opt/hermes/.venv/bin/hermes';
const BATCH_MIN = 50, BATCH_MAX = 100; // 每批人数随机 50-100 const BATCH_MIN = 50, BATCH_MAX = 100; // 每批人数随机 50-100
const OTHER = ACCT === 'hr1' ? 'hr2' : 'hr1'; const OTHER = ACCT === 'hr1' ? 'hr2' : 'hr1';
@@ -43,7 +43,7 @@ function send(target, text) {
fs.writeFileSync('/tmp/runner-msg-' + ACCT + '.txt', text); fs.writeFileSync('/tmp/runner-msg-' + ACCT + '.txt', text);
execSync(`${HERMES} send -t "feishu:${target}" -f /tmp/runner-msg-${ACCT}.txt`, execSync(`${HERMES} send -t "feishu:${target}" -f /tmp/runner-msg-${ACCT}.txt`,
{ stdio: ['pipe', 'pipe', 'pipe'], timeout: 60000 }); { stdio: ['pipe', 'pipe', 'pipe'], timeout: 60000 });
log(`已发送消息 → 私聊: ${text.slice(0, 60)}`); log(`已发送消息 → ${target === GROUP ? '群(数字HR)' : '私聊'}: ${text.slice(0, 60)}`);
} catch (e) { log(`发送失败: ${String(e.message).slice(0, 100)}`); } } catch (e) { log(`发送失败: ${String(e.message).slice(0, 100)}`); }
} }
+1 -1
View File
@@ -19,7 +19,7 @@ const path = require('path');
const SCRIPTS = '/opt/data/skills/recruitment-resume-screener/scripts'; const SCRIPTS = '/opt/data/skills/recruitment-resume-screener/scripts';
const STATE_DIR = '/opt/data/logs/recruitment/state'; const STATE_DIR = '/opt/data/logs/recruitment/state';
fs.mkdirSync(STATE_DIR, { recursive: true }); fs.mkdirSync(STATE_DIR, { recursive: true });
const GROUP = 'oc_d09c77b62ca5f90f6699830fbc695c44'; // 2026-08-26 修正:只发私聊 const GROUP = 'oc_7ef4980f25ec2a80bb013d5dd79b9864'; // 群:每日日报(2026-08-27 修正回群,消息策略定稿)
const HERMES = '/opt/hermes/.venv/bin/hermes'; const HERMES = '/opt/hermes/.venv/bin/hermes';
const bjNow = () => new Date(Date.now() + 8 * 3600 * 1000); const bjNow = () => new Date(Date.now() + 8 * 3600 * 1000);
const today = () => bjNow().toISOString().slice(0, 10); const today = () => bjNow().toISOString().slice(0, 10);