Bruno Murino
09/29/2021, 9:47 AMKevin Kho
Kevin Kho
Bruno Murino
09/29/2021, 3:05 PMBruno Murino
09/29/2021, 3:05 PMKevin Kho
query {
task_run_aggregate(where: {state: { _eq: "Success"}}){
aggregate {
count
}
}
}
Bruno Murino
09/29/2021, 3:48 PMKevin Kho
Kevin Kho
query {
task_run_aggregate(where:
{state: { _eq: "Success"},
start_time: {_gt: "2021-09-01T00:00:00"}
end_time: {_lt: "2021-09-30T00:00:00"}}){
aggregate {
count
}
}
}
Bruno Murino
09/29/2021, 3:57 PMKevin Kho
Bruno Murino
10/05/2021, 11:08 AMKevin Kho
Dylan
start_time
and end_time
fields on-the-fly in the UI. That’s what you’d need to calculate duration for your task runsBruno Murino
10/05/2021, 2:06 PMDylan
SUM
Dylan
Dylan
Success
and the difference between start_time
and end_time
is greater than one second” is the official calculation. If there is no start time or end time it means that we don’t charge for the taskDylan
Marvin
10/05/2021, 2:12 PMBruno Murino
10/05/2021, 2:16 PMBruno Murino
10/05/2021, 2:17 PMDylan
Bruno Murino
10/05/2021, 2:19 PMBruno Murino
10/05/2021, 2:19 PMDylan
SELECT start_time, end_time, TIMESTAMP_DIFF(start_time, end_time) FROM task_run WHERE state = 'Success' AND start_time IS NOT NULL AND end_time IS NOT NULL
Dylan
Bruno Murino
10/05/2021, 2:25 PMselect
date_trunc('month', start_time) as month,
extract(epoch from end_time-start_time) >= 1 as count_towards_quota,
count(*)
from public.task_run
where true
and state = 'Success'
and start_time is not null
and end_time is not null
and extract(epoch from end_time-start_time) >= 1
group by 1,2
order by date_trunc('month', start_time);
Dylan
Bruno Murino
10/05/2021, 2:49 PMDylan