feat: improve polling recovery and session cleanup

This commit is contained in:
2026-04-27 20:33:12 +08:00
parent ca2c559555
commit 89ba4163fc
22 changed files with 442 additions and 75 deletions
+15 -3
View File
@@ -128,7 +128,7 @@ const form = reactive<SystemSettings>({
<li><strong>Room ID:</strong> {{roomId}}</li>
<li><strong>Title:</strong> {{title}}</li>
<li><strong>Anchor:</strong> {{anchor}}</li>
<li><strong>Detected At (UTC):</strong> {{detectedAtUtc}}</li>
<li><strong>Detected At (Beijing Time):</strong> {{detectedAtUtc}}</li>
</ul>
<p><strong>Source URL:</strong> <a href="{{sourceUrl}}">{{sourceUrl}}</a></p>
</div>`,
@@ -142,7 +142,7 @@ const form = reactive<SystemSettings>({
<li><strong>Room ID:</strong> {{roomId}}</li>
<li><strong>Record Task ID:</strong> {{recordTaskId}}</li>
<li><strong>Task Status:</strong> {{taskStatus}}</li>
<li><strong>Occurred At (UTC):</strong> {{occurredAtUtc}}</li>
<li><strong>Occurred At (Beijing Time):</strong> {{occurredAtUtc}}</li>
</ul>
<div style="margin-top: 16px; padding: 12px 14px; border-radius: 8px; background: #f5f5f5; white-space: pre-wrap;">{{detail}}</div>
</div>`,
@@ -197,7 +197,7 @@ const eventScriptEnvironmentExamples = [
{ name: "LIVE_RECORDER_TITLE", example: "今晚划水聊天", scope: "全部事件" },
{ name: "LIVE_RECORDER_ANCHOR", example: "布莱克🌊", scope: "全部事件" },
{ name: "LIVE_RECORDER_SOURCE_URL", example: "https://live.douyin.com/676493068539", scope: "全部事件" },
{ name: "LIVE_RECORDER_OCCURRED_AT_UTC", example: "2026-04-25T12:34:56.7890000+00:00", scope: "全部事件" },
{ name: "LIVE_RECORDER_OCCURRED_AT_UTC", example: "2026-04-25T20:34:56.7890000+08:00", scope: "全部事件" },
{
name: "LIVE_RECORDER_SCRIPT_LOG_PATH",
example: "/tmp/live-recorder-script-log-7a13c2c5e5cd4f2d8ec2c3b2d5f3f1aa.txt",
@@ -755,6 +755,10 @@ onMounted(loadSettings);
<code>{fileStem}</code> 只用于目录模板表示按文件模板渲染后的基础名<code>{segmentSuffix}</code> 只用于文件名模板分段模式下会展开成 <code>_00001</code> 这类后缀单文件模式下为空
</div>
<div class="helper-panel">
目录模板和文件名模板中的时间变量统一按北京时间UTC+8渲染示例路径也按北京时间展示
</div>
<div class="token-list">
<span v-for="token in outputTemplateTokens" :key="token" class="token-chip">{{ token }}</span>
</div>
@@ -1156,6 +1160,10 @@ onMounted(loadSettings);
如果脚本想把自定义内容写进系统日志请把文本写入 <code>LIVE_RECORDER_SCRIPT_LOG_PATH</code> 指向的临时文件
</div>
<div class="event-script-help__intro">
虽然变量名仍然保留 <code>LIVE_RECORDER_OCCURRED_AT_UTC</code>但实际传入的时间值已经统一改成北京时间UTC+8
</div>
<div class="event-script-help__intro">
官方 Docker 镜像默认内置 <code>curl</code> <code>jq</code>如果你使用宿主机直跑或自定义镜像实际可用命令以运行环境为准
</div>
@@ -1352,6 +1360,10 @@ onMounted(loadSettings);
</div>
</div>
<div class="helper-panel">
邮件模板里的 <code v-pre>{{detectedAtUtc}}</code> <code v-pre>{{occurredAtUtc}}</code> 字段名保持不变但实际渲染值已经统一改成北京时间UTC+8
</div>
<div class="action-strip">
<div class="helper-text">测试发送不会自动保存配置邮件里会同时渲染开播提醒示例异常提醒示例</div>
<el-button :loading="testingEmail" :disabled="!canSendTestEmail" @click="sendTestEmail">测试邮件</el-button>