{% extends 'base.j2' %}
{% block title %}worker{% endblock %}
{% block content %}
<h1>worker</h1>

<table>
<thead>
    <tr>
        <th>key</th>
        <th>value</th>
    </tr>
</thead>
<tbody>
    <tr>
        <td>id</td>
        <td>{{ worker.id }}</td>
    </tr>
    <tr>
        <td>name</td>
        <td>{{ worker.name }}</td>
    </tr>
    <tr>
        <td>maxtasks</td>
        <td><code>{{ worker.maxtasks }}</code></td>
    </tr>
    <tr>
        <td>running_tasks</td>
        <td>{{ worker.running_tasks | length }}</td>
    </tr>
</tbody>
</table>

<h2>running tasks</h2>
<table>
<thead>
    <tr>
        <th>task_id</th>
    </tr>
</thead>
<tbody>
    {% for task_id in worker.running_tasks %}
    <tr>
        <td><a href="/tasks/{{ task_id }}"><code>{{ task_id }}</code></a></td>
    </tr>
    {% endfor %}
</tbody>
</table>

{% endblock %}
