Feature Request:`JobCount()` client function
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 38/100
Research direction
Start at the client’s existing JobList entry point and trace how its kind and state parameters reach the query. Add a lighter JobCount entry point that returns only the number of matching jobs rather than full JobRow values. Done means callers can count jobs by the same parameters without retrieving complete rows.
Written by the indexing model from the issue text.
Description
There's a nice JobList method on the client that can be used to get back a slice of all jobs, according to some provided params (kind, state etc).
I've been using this - but just to get a count of the number of jobs of each kind in each state (I've made a prometheus metrics Collector that keeps track of the number of jobs by kind and state).
This is quite a heavy query as it's returning the whole JobRow - which includes a bunch of fields I don't really care about for this narrow purpose.
It'd be great if there were a lighter weight JobCount method that would just return a count of the number of jobs according to the parameters.
- Dominant language
- Go
- Stars
- 5.7k
- Forks
- 179
- Avg merge
- 15h 43m
- Merged PRs (30d)
- 13
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from riverqueue/river
-
Difficulty 5/5 Over a week Newbie friendliness 45/100
riverqueue/river#1358 · 1 comment ·
-
Difficulty 3/5 1-2 days Newbie friendliness 78/100
riverqueue/river#1302 · 2 comments ·
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
riverqueue/river#1258 · 7 comments ·
-
Difficulty 4/5 3-5 days Newbie friendliness 45/100
riverqueue/river#1225 · 14 comments ·
-
Difficulty 4/5 3-5 days Newbie friendliness 52/100
riverqueue/river#1185 · 2 comments ·
All issues in riverqueue/river
Similar issues
-
Difficulty 1/5 Under an hour Newbie friendliness 92/100
milvus-io/birdwatcher#545 ·
-
kind/bug
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
kubernetes-sigs/prow#953 · 1 comment ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
caddyserver/caddy#8046 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
jaegertracing/jaeger#9588 ·