-
Notifications
You must be signed in to change notification settings - Fork 106
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
Discovery undisbursed endpoint for rewards #1642
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As discussed, gonna simplify this since we don't need to roll up aggregates
ns = Namespace("challenges", description="Challenge related operations") | ||
|
||
get_undisbursed_challenges_route_parser = reqparse.RequestParser() | ||
get_undisbursed_challenges_route_parser.add_argument("limit", required=False, type=int) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thoughts about if having offset would be useful as well?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, we can add it, but I think cursor (keyset) base pagination might be more resilient?
For reference, this currently uses completed_blocknumber
as the pseudo offset, but maybe we should add another field for offset - will do.
The things I'm worried about is if we add an offset and the challenges are being disbursed as we go, we could potentially skip challenges b/c of the offset.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
totally missed completed_blocknumber. makes sense
6ccc3e6
to
9623905
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks awesome - just small things. Hyped to get this merged
Bugfix Discovery undisbursed endpoint for rewards (#1642) * Add undisbursed challenges endpoint * Fix lint in discovery * Add undisbursed endpoint route * Fix limit and endpoint name * Addressed comments * Fix lint * Rebase changes * Update discovery test around fixture * Pass through arg * Address comments * Remove unused imports lint Support rewards challenge fields (#1636) * Support UserEvents in discovery indexing * Support referrer and is_mobile_user in libs * Add events to tasks metadata * Address comments * Fix misc type issues * Remove unused imports * Fix get_attestation type bug * Fix lint * Update down revision Debugging Debugging Circle config update config Debug Debug Debug Consolidate some logic Consolidate some logic Final cleanup + polish
Description
Adds
/v1/challenges/undisbursed
endpoint for discoveryTests
Wrote tests for the query
How will this change be monitored?
it will not be
Closes AUD-718