Commit 11d696a7 authored by Łukasz Nowak's avatar Łukasz Nowak

- implement proof of concept grouping by tag

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@29347 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 053e1cb5
......@@ -4,6 +4,7 @@
# ideas:
# - more control on what would be displayed
# - allow to group by tag instead of method_id
# - somehow done, use shell variable text_group
# - use python with curses to have runtime control
function show_help ( )
......@@ -37,7 +38,7 @@ fi
SELECT=""
for t in message message_queue ; do
SELECT=$SELECT"""
SELECT count(*) AS $t, method_id, processing, processing_node AS node, min(priority) AS min_pri, max(priority) AS max_pri FROM $t GROUP BY method_id, processing, processing_node ORDER BY node;
SELECT count(*) AS $t, ${text_group:-method_id}, processing, processing_node AS node, min(priority) AS min_pri, max(priority) AS max_pri FROM $t GROUP BY ${text_group:-method_id}, processing, processing_node ORDER BY node;
SELECT count(*) AS $t, processing, processing_node, min(priority) AS min_pri, max(priority) AS max_pri FROM $t GROUP BY processing, processing_node;
SELECT priority as pri, MIN(timediff(NOW(), date)) AS min, AVG(timediff(NOW() , date)) AS avg, MAX(timediff(NOW() , date)) AS max FROM $t GROUP BY priority;
SELECT count(*) AS ${t}_count FROM $t;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment