mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-17 15:03:25 +00:00
duration even if not finished (#4157)
This commit is contained in:
@@ -393,7 +393,8 @@ class WorkerRunningJobRepository extends EntityRepository
|
||||
$rsm->addScalarResult('duration', 'duration');
|
||||
$rsm->addScalarResult('status', 'status');
|
||||
|
||||
$sql = "SELECT info, databox_id as databoxId, record_id as recordId, work, work_on as workOn, published, created, finished, status, TIMESTAMPDIFF(SECOND, w.created, w.finished) as duration \n"
|
||||
$sql = "SELECT info, databox_id as databoxId, record_id as recordId, work, work_on as workOn, published, created, finished, status, \n"
|
||||
. "IF(w.finished IS NULL, TIMESTAMPDIFF(SECOND, w.created, NOW()), TIMESTAMPDIFF(SECOND, w.created, w.finished)) as duration \n"
|
||||
. "FROM WorkerRunningJob w \n"
|
||||
. "WHERE 1";
|
||||
|
||||
|
@@ -134,9 +134,9 @@
|
||||
{% endif %}
|
||||
</td>
|
||||
<td>
|
||||
{% if workerRow.duration is not empty %}
|
||||
<span {% if workerRow.finished is empty%} style="color:#ff8100;" {% endif %}>
|
||||
{{ workerRow.duration|date_duration }}
|
||||
{% endif %}
|
||||
</span>
|
||||
</td>
|
||||
<td>{{ workerRow.status }}</td>
|
||||
<td>
|
||||
|
Reference in New Issue
Block a user