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

Metrics: WorkClaim Counts #627

Merged
merged 11 commits into from
Oct 23, 2018
Merged

Metrics: WorkClaim Counts #627

merged 11 commits into from
Oct 23, 2018

Conversation

jwicks31
Copy link
Contributor

@jwicks31 jwicks31 commented Oct 23, 2018

PR Process - PR Review Checklist

Release

Semantic release is enabled for this repository. Make sure you follow the right commit message convention.
We're using semantic-release's default — Angular Commit Message Conventions.

Description of Changes

Resolves #626

API

Router

  • /metrics endpoint
  • getWorkCounts

WorkController

  • getWorksCountByFilters

Notes

Should I include integration/functional tests either in this PR or in an additional one?

@jwicks31 jwicks31 self-assigned this Oct 23, 2018
@jwicks31 jwicks31 requested a review from a team October 23, 2018 21:39
async getWorksCountByFilters(worksFilters: WorksFilters = {}): Promise<WorkCount> {
this.logger.trace({ method: 'getByFilters', worksFilters }, 'Getting Work by Filters from DB')
const count = await this.collection.find(worksFilters, { projection: { _id: false } }).count()
return { count }
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we just return an integer here instead of an object? It would better match the function name.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah that makes sense. I updated it.

Copy link
Contributor

@warrenv warrenv left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • [no] Tested changes manually
  • Checked accidental architectural/style changes
  • Reviewed entire diff
  • [n/a] Unit tests
  • [n/a] Documentation
  • Filenames and locations

@jwicks31 jwicks31 merged commit 47b99f2 into master Oct 23, 2018
@jwicks31 jwicks31 deleted the metrics branch October 23, 2018 23:57
@poet-ci
Copy link

poet-ci commented Oct 25, 2018

🎉 This PR is included in version 2.0.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Metrics: Claims
3 participants