File: task.html

package info (click to toggle)
dask.distributed 2022.12.1%2Bds.1-3
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 10,164 kB
  • sloc: python: 81,938; javascript: 1,549; makefile: 228; sh: 100
file content (166 lines) | stat: -rw-r--r-- 5,672 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
{% extends main.html %}
{% block content %}

  {% set ts = tasks[Task] %}
  <h1 class="title"> Task: {{ ts.key }} </h1>

      <table class="table box">
          <tr>
              <th> Status </th>
              <td> {{ ts.state }} </td>
          </tr>
          {% if ts.processing_on %}
          <tr>
              <th> Processing on </th>
              <td><a href="../worker/{{ url_escape(ts.processing_on.address) }}.html">{{ts.processing_on.address}}</a></td>
          </tr>
          <tr>
              <th> Call stack </th>
              <td><a class="button is-primary" href="../call-stack/{{ url_escape(Task) }}.html">Call Stack</a></td>
          </tr>
          {% end %}
          {% if ts.type %}
          <tr>
              <th> Type </th>
              <td> {{ ts.type }} </td>
          </tr>
          {% end %}
          {% if ts.nbytes %}
          <tr>
              <th> Bytes </th>
              <td> {{ format_bytes(ts.nbytes) }} </td>
          </tr>
          {% end %}
          {% if ts.state == 'waiting' %}
          {% for dts in ts.waiting_on %}
          <tr>
              <td> waiting on </td>
              <td><a href="{{ url_escape(dts.key) }}.html">{{dts.key}}</a> </td>
          </tr>
          {% end %}
          {% end %}
          <tr>
              <th> Priority </th>
              <td>{{ts.priority}}</td>
          </tr>
          {% for attr in ['has_lost_dependencies', 'host_restrictions', 'worker_restrictions', 'resource_restrictions', 'loose_restrictions', 'suspicious', 'retries', 'metadata'] %}
          {% if getattr(ts, attr) %}
          <tr>
              <th> {{attr.replace('_', ' ').title()}} </th>
              <td> {{getattr(ts, attr)}} </td>
          </tr>
          {% end %}
          {% end %}
      </table>

    {% if ts.exception_text and ts.traceback_text %}
    <div class="box">
        <h3 class="title is-5"> Exception information </h3>
        <p>
            <span>Exception:</span>
            <code> {{ ts.exception_text }} </code>
        </p>
        <details style="border: 1px solid black; border-radius: 4px; padding: 1em; margin-top: 4px;">
            <summary style="font-weight: bold">Traceback</summary>
            <pre><code>{{ ts.traceback_text }} </code></pre>
        </details>
        <div>
        </div>
    </div>
    {% end %}

    <div id="dependencies-dependents" class="columns box">
      <div id="dependencies" class="column">
        <h3 class="title is-5"> Dependencies </h3>
        <table class="table is-striped is-hoverable">
          <thead>
            <th> Key </th>
            <th> State </th>
          </thead>
          {% for dts in ts.dependencies %}
          <tr>
            <td> <a href="{{ url_escape(dts.key) }}.html">{{dts.key}}</a> </td>
            <td> {{ dts.state }} </td>
          </tr>
          {% end %}
        </table>
      </div><!-- #dependencies -->

      <div id="dependents" class="column">
        <h3 class="title is-5"> Dependents </h3>
        <table class="table is-striped is-hoverable">
          <thead>
            <th> Key </th>
            <th> State </th>
          </thead>
          {% for dts in ts.dependents %}
          <tr>
            <td> <a href="{{ url_escape(dts.key) }}.html">{{dts.key}}</a> </td>
            <td> {{ dts.state }} </td>
          </tr>
          {% end %}
        </table>
      </div><!-- #dependents -->
    </div><!-- #dependencies-dependents -->

    <div id="workers-clients" class="columns box">
      {% if ts.state == 'memory' %}
      <div id="workers" class="column">
        <h3 class="title is-5"> Workers with data </h3>
          {% set worker_list = ts.who_has %}
          {% include "worker-table.html" %}
      </div><!-- #workers -->
      {% end %}

      {% if ts.who_wants %}
      <div id="clients" class="column">
        <h3 class="title is-5"> Clients with future </h3>
        <div class="content">
          <ul>
            {% for cs in ts.who_wants %}
            <li> <a href="../client/{{ url_escape(cs.client_key) }}.html">{{cs.client_key}}</a></li>
            {% end %}
          </ul>
        </div>
      </div><!-- #clients -->
      {% end %}
    </div><!-- #workers-clients -->

      <div id="transition-log" class="box">
        <h3 class="title is-5"> Transition Log </h3>
          <table class="table is-bordered is-striped is-hoverable">
              <thead>
                  <th> Time </th>
                  <th> Key </th>
                  <th> Start </th>
                  <th> Finish </th>
                  <th> Stimulus ID </th>
                  <th> Recommended Key </th>
                  <th> Recommended Action </th>
              </thead>

              {% for key, start, finish, recommendations, stimulus_id, transition_time in scheduler.story(Task) %}
              <tr>
                  <td> {{ fromtimestamp(transition_time) }} </td>
                  <td> <a href="{{ url_escape(key) }}.html">{{key}}</a> </td>
                  <td> {{ start }} </td>
                  <td> {{ finish }} </td>
                  <td> {{ stimulus_id }} </td>
                  <td> </td>
                  <td> </td>
              </tr>
                {% for key2, rec in recommendations.items() %}
              <tr>
                  <td> </td>
                  <td> </td>
                  <td> </td>
                  <td> </td>
                  <td> </td>
                  <td> <a href="{{ url_escape(key2) }}.html">{{key2}}</a> </td>
                  <td> {{ rec }} </td>
              </tr>
                {% end %}
              {% end %}
          </table>
      </div><!-- #transition-log -->
{% end %}