mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2026-05-10 15:12:12 +00:00
Clean up stale pending jobs and add job ID to display
- Auto-delete pending jobs with 0 results (from failed searches/500 errors) - Show job ID (#N) in manage page and step2 to distinguish identical jobs - Move timestamp to subtitle line on manage page for cleaner layout
This commit is contained in:
parent
8e66f32ddc
commit
99148eee76
3 changed files with 6 additions and 5 deletions
|
|
@ -282,8 +282,8 @@ class BulkInfoProviderImportController extends AbstractController
|
|||
$updatedJobs = true;
|
||||
}
|
||||
|
||||
// Mark jobs with no results for deletion (failed searches)
|
||||
if ($job->getResultCount() === 0 && $job->isInProgress()) {
|
||||
// Mark jobs with no results for deletion (failed searches or stale pending)
|
||||
if ($job->getResultCount() === 0 && ($job->isInProgress() || $job->isPending())) {
|
||||
$jobsToDelete[] = $job;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -97,7 +97,8 @@
|
|||
{% set showCompletedAt = showCompletedAt|default(false) %}
|
||||
<tr>
|
||||
<td>
|
||||
<strong>{{ job.displayNameKey|trans(job.displayNameParams) }} - {{ job.formattedTimestamp }}</strong>
|
||||
<strong>#{{ job.id }} - {{ job.displayNameKey|trans(job.displayNameParams) }}</strong>
|
||||
<br><small class="text-muted">{{ job.formattedTimestamp }}</small>
|
||||
</td>
|
||||
<td>{{ job.partCount }}</td>
|
||||
<td>{{ job.resultCount }}</td>
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@
|
|||
|
||||
{% block card_title %}
|
||||
<i class="fas fa-search"></i> {% trans %}info_providers.bulk_import.step2.title{% endtrans %}
|
||||
<span class="badge bg-secondary">{{ job.displayNameKey|trans(job.displayNameParams) }} - {{ job.formattedTimestamp }}</span>
|
||||
<span class="badge bg-secondary">#{{ job.id }} - {{ job.displayNameKey|trans(job.displayNameParams) }}</span>
|
||||
{% endblock %}
|
||||
|
||||
{% block card_content %}
|
||||
|
|
@ -44,7 +44,7 @@
|
|||
}) }}>
|
||||
<div class="d-flex justify-content-between align-items-center mb-3">
|
||||
<div>
|
||||
<h5 class="mb-1">{{ job.displayNameKey|trans(job.displayNameParams) }} - {{ job.formattedTimestamp }}</h5>
|
||||
<h5 class="mb-1">#{{ job.id }} - {{ job.displayNameKey|trans(job.displayNameParams) }}</h5>
|
||||
<small class="text-muted">
|
||||
{{ job.partCount }} {% trans %}info_providers.bulk_import.parts{% endtrans %} •
|
||||
{{ job.resultCount }} {% trans %}info_providers.bulk_import.results{% endtrans %} •
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue