mirror of
https://github.com/perstarkse/minne.git
synced 2026-04-23 17:28:34 +02:00
feat: state machine for tasks, multiple workers
This commit is contained in:
@@ -23,12 +23,18 @@
|
||||
</div>
|
||||
<div class="space-y-1">
|
||||
<div class="text-sm font-semibold">
|
||||
{% if item.status.name == "InProgress" %}
|
||||
In progress, attempt {{ item.status.attempts }}
|
||||
{% elif item.status.name == "Error" %}
|
||||
Error: {{ item.status.message }}
|
||||
{% if item.state == "Processing" %}
|
||||
Processing, attempt {{ item.attempts }} of {{ item.max_attempts }}
|
||||
{% elif item.state == "Reserved" %}
|
||||
Reserved, attempt {{ item.attempts }} of {{ item.max_attempts }}
|
||||
{% elif item.state == "Failed" %}
|
||||
Retry scheduled (attempt {{ item.attempts }} of {{ item.max_attempts }}){% if item.error_message %}: {{ item.error_message }}{% endif %}
|
||||
{% elif item.state == "DeadLetter" %}
|
||||
Failed permanently{% if item.error_message %}: {{ item.error_message }}{% endif %}
|
||||
{% elif item.state == "Succeeded" %}
|
||||
Completed
|
||||
{% else %}
|
||||
{{ item.status.name }}
|
||||
{{ item.state }}
|
||||
{% endif %}
|
||||
</div>
|
||||
<div class="text-xs font-semibold opacity-60">
|
||||
@@ -60,4 +66,4 @@
|
||||
</ul>
|
||||
{% endif %}
|
||||
</section>
|
||||
{% endblock %}
|
||||
{% endblock %}
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
</div>
|
||||
<div class="space-y-1">
|
||||
<div class="text-sm font-semibold flex gap-2 items-center">
|
||||
<span sse-swap="status" hx-swap="innerHTML">Created</span>
|
||||
<span sse-swap="status" hx-swap="innerHTML">Pending</span>
|
||||
<div hx-get="/content/recent" hx-target="#latest_content_section" hx-swap="outerHTML"
|
||||
hx-trigger="sse:update_latest_content"></div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user