This is an automated email from the ASF dual-hosted git repository.
sbp pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/tooling-trusted-releases.git
The following commit(s) were added to refs/heads/main by this push:
new 3ddcda3 Add a column showing how long recent tasks took
3ddcda3 is described below
commit 3ddcda39585b28129e8afa22deca3535169888c3
Author: Sean B. Palmer <[email protected]>
AuthorDate: Fri Dec 19 19:32:27 2025 +0000
Add a column showing how long recent tasks took
---
atr/admin/__init__.py | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/atr/admin/__init__.py b/atr/admin/__init__.py
index 5b86ea6..56cac73 100644
--- a/atr/admin/__init__.py
+++ b/atr/admin/__init__.py
@@ -744,6 +744,7 @@ async def tasks_recent(session: web.Committer, minutes:
int) -> str:
htpy.th["Type"],
htpy.th["Status"],
htpy.th["Added"],
+ htpy.th["Took"],
htpy.th["Project"],
htpy.th["Version"],
htpy.th["Revision"],
@@ -759,12 +760,18 @@ async def tasks_recent(session: web.Committer, minutes:
int) -> str:
sql.TaskStatus.COMPLETED: ".table-success",
sql.TaskStatus.FAILED: ".table-danger",
}.get(task.status, "")
+ if (task.started is not None) and (task.completed is not None):
+ took_seconds = (task.completed - task.started).total_seconds()
+ took_text = f"{took_seconds:.1f}s"
+ else:
+ took_text = ""
tbody.append(
htpy.tr(class_=status_class.lstrip(".") if status_class else
None)[
htpy.td[str(task.id)],
htpy.td[task.task_type.value],
htpy.td[task.status.value],
htpy.td[task.added.strftime("%H:%M:%S") if task.added else
""],
+ htpy.td[took_text],
htpy.td[task.project_name or ""],
htpy.td[task.version_name or ""],
htpy.td[task.revision_number or ""],
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]