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

Fetch actionable with pagination #4655

Merged
merged 22 commits into from
Mar 26, 2024
Merged

Conversation

mstrasinskis
Copy link
Contributor

@mstrasinskis mstrasinskis commented Mar 22, 2024

Motivation

Use multiple requests to get as much proposals with the status ACCEPT_VOTES as possible because there is limitation on the backend side, how many proposals can be requested with a single request. New approach uses maximum 5 requests (with the limit 100 for Nns and 20 for Snses each).

Changes

  • new const MAX_ACTIONABLE_REQUEST_COUNT = 5
  • extend loadActionableProposals to make multiple calls
  • extend loadActionableSnsProposals to make multiple calls
  • added an error when page limit reached to have a feedback when this happens.

Tests

  • loadActionableProposals makes multiple calls
  • loadActionableSnsProposals makes multiple calls
  • manually with changing the page size

Todos

  • Add entry to changelog (if necessary).
    Not yet.

Screenshots

image

@mstrasinskis mstrasinskis requested a review from a team as a code owner March 22, 2024 16:50
@mstrasinskis mstrasinskis requested a review from dskloetd March 22, 2024 16:50
Copy link
Contributor

@dskloetd dskloetd left a comment

Choose a reason for hiding this comment

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

Some comments apply twice.

@mstrasinskis mstrasinskis requested a review from dskloetd March 25, 2024 09:03
@mstrasinskis mstrasinskis requested a review from dskloetd March 26, 2024 08:40
@mstrasinskis mstrasinskis enabled auto-merge March 26, 2024 10:44
@mstrasinskis mstrasinskis added this pull request to the merge queue Mar 26, 2024
Merged via the queue into main with commit d1f4d99 Mar 26, 2024
50 checks passed
@mstrasinskis mstrasinskis deleted the fetch-actionable-with-pagination branch March 26, 2024 11:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants