diff --git a/DouYinSparkFlow/config.json b/DouYinSparkFlow/config.json index dc68a70..0d0a0a2 100644 --- a/DouYinSparkFlow/config.json +++ b/DouYinSparkFlow/config.json @@ -35,6 +35,5 @@ "happyNewYear": { "enabled": true, "messageTemplate": "\r\n" - }, - "useProtocolSender": false -} \ No newline at end of file + } +} diff --git a/DouYinSparkFlow/core/tasks.py b/DouYinSparkFlow/core/tasks.py index f327e65..a6288e0 100644 --- a/DouYinSparkFlow/core/tasks.py +++ b/DouYinSparkFlow/core/tasks.py @@ -374,7 +374,18 @@ def _select_due_targets(user, send_window, now): microsecond=0, ) if now < window_start or now > window_end: - return [], [], [(target, _scheduled_send_time(user, target, send_window, now)) for target in targets], [] + already_sent = [] + pending_targets = [] + queued_failures = [] + for target_name in targets: + if _target_sent_today(user, target_name, now): + already_sent.append(target_name) + continue + if _target_failed_today(user, target_name, now): + queued_failures.append(target_name) + continue + pending_targets.append((target_name, _scheduled_send_time(user, target_name, send_window, now))) + return [], already_sent, pending_targets, queued_failures due_targets = [] already_sent = [] diff --git a/DouYinSparkFlow/webui/app.py b/DouYinSparkFlow/webui/app.py index d9cc4e7..6e43fee 100644 --- a/DouYinSparkFlow/webui/app.py +++ b/DouYinSparkFlow/webui/app.py @@ -575,9 +575,9 @@ def create_app(): pid = run_task_now() if pid == -1: - flash(request, "Failed to start failed-target retry run. Check server logs for details.", "error") + flash(request, "Failed to start the full resend run. Check server logs for details.", "error") else: - flash(request, f"Triggered a failed-target retry run in the background (pid {pid}).", "success") + flash(request, f"Triggered a full resend run in the background (pid {pid}).", "success") return redirect("/") @app.post("/ops/proxy/refresh") diff --git a/DouYinSparkFlow/webui/ops.py b/DouYinSparkFlow/webui/ops.py index 8a36213..bdfe93a 100644 --- a/DouYinSparkFlow/webui/ops.py +++ b/DouYinSparkFlow/webui/ops.py @@ -196,7 +196,6 @@ def run_task_now(): cwd=cwd, env={ "SPARKFLOW_MANUAL_RUN": "1", - "SPARKFLOW_MANUAL_FAILED_ONLY": "1", "PYTHONUNBUFFERED": "1", }, ) diff --git a/DouYinSparkFlow/webui/templates/base.html b/DouYinSparkFlow/webui/templates/base.html index b58e20c..d364ca7 100644 --- a/DouYinSparkFlow/webui/templates/base.html +++ b/DouYinSparkFlow/webui/templates/base.html @@ -1,41 +1,57 @@ +{% set current_nav %}{% block nav_key %}dashboard{% endblock %}{% endset %} - {% block title %}抖音多账号续火花控制台{% endblock %} + {% block title %}自动续火花{% endblock %} + +
+
+
首页总览 · 当前系统状态与发送概况
+ +
+
+
+ 启用账号 + {{ enabled_accounts|length }} +
+ 总账号 {{ accounts|length }} +
-
+
👥
+ - +
+
+ 今日成功目标 + {{ send_summary.today_sent_targets }} +
+ 成功结果来自浏览器真实发送确认 +
+
+
🎯
+
-
+ +
+
+
+
+
+

交互式登录浏览器

+

直接在网页中操作远端浏览器完成扫码、验证码与创作者中心登录,登录完成后可一键保存当前账号。

-
-
-
-
-

发送控制台摘要

-

展示今天的成功、失败、待发送与待补发状态。失败目标可在详情页单独重试。

-
- 打开发送控制台 -
-
-
-
- 启用账号 - {{ ops.send_console.summary.enabled_accounts }} + -
A
-
-
-
- 今日成功目标 - {{ ops.send_console.summary.today_sent_targets }} -
-
OK
-
-
-
- 失败待补发 - {{ ops.send_console.summary.today_failed_targets }} -
-
!
-
-
-
- 待发送 / 未处理 - {{ ops.send_console.summary.today_pending_targets + ops.send_console.summary.today_unprocessed_targets }} -
-
...
-
-
-
- - - - - - - - - - - - - {% for row in ops.send_console.accounts %} - - - - - - - - - {% else %} - - {% endfor %} - -
账号今日成功失败待补发待发送未处理最后失败原因
{{ row.username }}
{{ row.unique_id }}
{{ row.sent_targets|length }}{{ row.failed_targets|length }}{{ row.pending_targets|length }}{{ row.unprocessed_targets|length }}{{ row.last_failure_reason or "-" }}
暂无发送状态摘要。
-
-
-
-
-
-

账号管理({{ accounts|length }})

-

多账号、目标好友、启停状态、交互式登录同步都在这里集中管理。

-
-
- - {% if accounts %} - - {% else %} -
还没有账号。先通过交互式登录浏览器登录并保存账号。
- {% endif %} -
+
+ -
-
-

容器状态

-
+
+
+
+

发送控制台摘要

+

查看每个账号今天的发送状态分布,并快速进入发送控制台做批量补发或针对性重试。

+
+ 打开发送控制台 +
+ +
+
+
+ 启用账号 + {{ send_summary.enabled_accounts }} +
+
A
+
+
+
+ 今日成功目标 + {{ send_summary.today_sent_targets }} +
+
+
+
+
+ 失败待补发 + {{ send_summary.today_failed_targets }} +
+
!
+
+
+
+ 待发送 / 未处理 + {{ send_summary.today_pending_targets + send_summary.today_unprocessed_targets }} +
+
+
+
+ +
- - - + + + + + + - {% for row in ops.containers %} + {% for row in ops.send_console.accounts %} - - + + + + + {% else %} - + {% endfor %}
NameStatusImage账号今日成功失败待补发待发送未处理最近失败原因
{{ row.Names }} - - {{ row.Status }} - + {{ row.username }}
+ {{ row.unique_id }}
{{ row.Image }}{{ row.sent_targets|length }}{{ row.failed_targets|length }}{{ row.pending_targets|length }}{{ row.unprocessed_targets|length }}{{ row.last_failure_reason or "-" }}
当前没有可见容器状态。
当前没有发送摘要数据。
-
-

Cron / 调度(服务端 crontab)

-
{{ ops.crontab or "当前没有 crontab 任务。" }}
+
+
+
+

账号管理

+

集中管理账号开关、目标好友、好友缓存、登录同步和删除操作。布局与发送控制台保持同一套卡片系统。

+
+
+ + {% if accounts %} + + {% else %} +
当前没有账号。先通过交互式登录浏览器登录并保存账号。
+ {% endif %}
-
-

日志预览(最近 100 行)

-
{{ ops.log_tail or "暂无日志" }}
-
+
+
+

容器状态

+
+ + + + + + + + + + {% for row in ops.containers %} + + + + + + {% else %} + + {% endfor %} + +
NameStatusImage
{{ row.Names }}{{ row.Status }}{{ row.Image }}
当前没有可见容器状态。
+
+
+ +
+

Cron / 调度

+
{{ ops.crontab or "当前没有 crontab 任务。" }}
+
+ +
+

日志预览

+
{{ ops.log_tail or "暂无日志" }}
+
+
-
- -
- -
-
-
-

面板与服务器设置

-

服务器参数、交互式登录桌面 API 地址、日志路径等基础设置。

-
+
+
-
- -
- - - - - - - - - - -
-
- -
-
- + {% endblock %} {% block scripts %} {% endblock %}