Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix the query to count number of workflows #160

Merged
merged 1 commit into from
Jul 10, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions parts/22-query.sh
Original file line number Diff line number Diff line change
Expand Up @@ -1846,7 +1846,7 @@ query_workflow-count() { ##? [date] : Count the number of workflow.
$ gxadmin query workflow-count
num_workflows
---------------
471969
403101
(1 row)
EOF

Expand All @@ -1857,7 +1857,7 @@ query_workflow-count() { ##? [date] : Count the number of workflow.

read -r -d '' QUERY <<-EOF
SELECT
count(*) as num_workflows
count(distinct(uuid)) as num_workflows
FROM
workflow
$where
Expand Down Expand Up @@ -5381,7 +5381,7 @@ query_tools-usage-per-month() { ##? [--startmonth=<YYYY>-<MM>] [--endmonth=<YYYY
Tools Usage Tracking: cpu-hours and nb_users by Month-Year.

$ gxadmin query tools-usage-per-month --super_short_tool_id --no_version --tools bowtie2,Cut1 --startmonth=2023-03 --endmonth 2023-08
month | cpu_hours | tool_id | nb_users
month | cpu_hours | tool_id | nb_users
------------+-----------+---------+----------
2023-08-01 | 796.15 | bowtie2 | 2
2023-07-01 | 20.04 | bowtie2 | 1
Expand Down Expand Up @@ -5525,11 +5525,11 @@ query_tools-usage() { ##? [year] [--tools=<tool1,tool2,...>] [--short_tool_id] [
Tools Usage Tracking: cpu-hours, cpu-years and nb_users for specific tools (optionally in a given year).

$ gxadmin query tools-usage --super_short_tool_id --no_version --tools bowtie2,Cut1 2023
cpu_hours | cpu_years | tool_id | nb_users
cpu_hours | cpu_years | tool_id | nb_users
-----------+-----------+---------+----------
4631.91 | 0.53 | bowtie2 | 7
0.24 | 0.00 | Cut1 | 6
(2 rows)
4631.91 | 0.53 | bowtie2 | 7
0.24 | 0.00 | Cut1 | 6
(2 rows)
EOF
if [[ -n $arg_year ]]; then
filter_by_year="AND date_trunc('year', job.create_time AT TIME ZONE 'UTC') = '$arg_year-01-01'::date"
Expand Down
Loading