[ARVADOS] created: 1.3.0-1085-g641552ee2

Git user git at public.curoverse.com
Thu Jun 13 20:39:53 UTC 2019


        at  641552ee206524115aa63d68432ee23bf9d05278 (commit)


commit 641552ee206524115aa63d68432ee23bf9d05278
Author: Peter Amstutz <pamstutz at veritasgenetics.com>
Date:   Thu Jun 13 16:39:27 2019 -0400

    15087: Display pending/running containers and queue delay.
    
    Arvados-DCO-1.1-Signed-off-by: Peter Amstutz <pamstutz at veritasgenetics.com>

diff --git a/apps/workbench/app/views/projects/_compute_node_summary.html.erb b/apps/workbench/app/views/projects/_compute_node_summary.html.erb
index 40a212e5b..613751cb0 100644
--- a/apps/workbench/app/views/projects/_compute_node_summary.html.erb
+++ b/apps/workbench/app/views/projects/_compute_node_summary.html.erb
@@ -9,12 +9,23 @@ SPDX-License-Identifier: AGPL-3.0 %>
         <col width="50%">
       </colgroup>
       <tr>
-        <td><%= nodes.select {|n| n.crunch_worker_state == "busy" }.size %></td>
-        <td><%= nodes.select {|n| n.crunch_worker_state == "idle" }.size %></td>
+	<% queued_containers = Container.order("modified_at asc").filter([["state", "in", ["Queued", "Locked"]], ["priority", ">", 0]]).limit(1) %>
+	<% running_containers = Container.order("started_at desc").where(state: "Running").limit(1) %>
+        <td><%= queued_containers.items_available %></td>
+        <td><%= running_containers.items_available %></td>
       </tr>
       <tr>
-        <th>Busy nodes</th>
-        <th>Idle nodes</th>
+        <th>Pending containers</th>
+        <th>Running containers</th>
+      </tr>
+      <tr>
+        <th><%= if queued_containers.first then render_runtime(Time.now - queued_containers.first.modified_at, false, false) else "-" end %></th>
+        <th><%= if running_containers.first then render_runtime(Time.now - running_containers.first.started_at, false, false) else "-" end %></th>
+      </tr>
+      <tr>
+        <th>Queue wait</th>
+        <th>Last start</th>
       </tr>
     </table>
+
 </div>

-----------------------------------------------------------------------


hooks/post-receive
-- 




More information about the arvados-commits mailing list