{% extends "base.html" %} {% from "_macros.html" import th, lbl %} {% block title %}运行 Run #{{ run.id }} · 爬虫控制台{% endblock %} {% block content %}

运行 Run #{{ run.id }} — {{ policy_name }}

{{ th('状态', 'Status') }}{{ th('任务', 'Job') }}{{ th('集群', 'Cluster') }}{{ th('开始', 'Started') }}{{ th('结束', 'Finished') }}{{ th('时长', 'Duration') }}
{{ run.status }} {{ run.job_ref or '—' }} {{ cluster_name or 'scrapyd/local' }} {{ run.started_at or '—' }} {{ run.finished_at or '—' }} {{ duration_min ~ 'm' if duration_min is not none else '—' }}

产出 Yield

{{ th('计划格子', 'Plan cells') }}{{ th('尝试试行数', 'Rows attempted') }}{{ th('新增行数', 'Rows new') }}
{{ run.plan_cells if run.plan_cells is not none else '—' }} {{ run.rows_attempted if run.rows_attempted is not none else '—' }} {{ run.rows_new if run.rows_new is not none else '—' }}
{% if run.detail %}

{{ run.detail }}

{% endif %}

计划 Plan

{{ th('模式', 'Mode') }}{{ th('实体范围', 'Entity scope') }}{{ th('日期', 'Dates') }}
{{ plan.mode or '—' }} {{ plan.entity_type }}{% if plan.entity_ids %} ({{ plan.entity_ids | length }} 显式 explicit){% else %} (全部 all){% endif %} {{ plan.start or '?' }} → {{ plan.end or '?' }}
{{ th('概念', 'Concept') }}{{ th('排序后的源', 'Ranked sources') }} {% for c in plan.concepts %} {% else %} {% endfor %}
{{ c.code or c.id }}{{ c.sources | join(' → ') or '—' }}
该运行没有编译计划 No compiled plan on this run.

运行窗口内的抓取 Fetches during run window

近似值 Approximation: fetch_log 在 {{ fetch_window[0] or '?' }} 到 {{ fetch_window[1] }} 之间的行, 过滤到本次运行计划的概念{% if cluster_name %}和集群{% endif %} — 相互重叠的运行可能重复计数。 filtered to this run's plan concepts{% if cluster_name %} and cluster{% endif %} — overlapping runs may double-count.

{% block fetch_viz %} {% from "_macros.html" import svg_timeline %} {% if fetch_timeline %}
{{ svg_timeline(fetch_timeline) }}

{% for f in fetch_summary %}{{ f.status }} {{ f.count }}{% if not loop.last %} · {% endif %}{% endfor %}

ok 成功err 错误
{% else %}
{{ th('状态', 'Status') }}{{ th('数量', 'Count') }} {% for f in fetch_summary %} {% else %} {% endfor %}
{{ f.status }}{{ f.count }}
窗口内没有抓取记录 No fetches recorded in the window.
{% endif %} {% endblock %} {% endblock %}