-
Notifications
You must be signed in to change notification settings - Fork 2
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
Add pagination for oscar referrals #131
base: staging
Are you sure you want to change the base?
Conversation
@mtuchi this branch is in conflict with master |
@mtuchi I'm not sure I understand the reasoning behind fetching 20 cases at a time. Whether you fetch 20 or 1000 at once, you're still going to make a separate request for each individual case. So what benefit does a smaller batch have? |
@mtuchi also this problem was true on the original version - the base branch will still send out a new request for every referral. All we've done in this PR is is make MORE Api calls. Significantly more if we're pulling down ~1000 records. |
@josephjclark Making a small batch can help with retry incase of failure because you can adjust the |
Ok, the debugging argument seems valid. I'm just interested in how much slower this change is going to make it. Again, in the v1 implementation, it just fetched everything and then fetched referrals one at a time and extra debugging wasn't needed then 🤷 Maybe a bigger page, perhaps 100 cases, would be a better compromise? One thing I would recommend is that you add logging in the job code at the start and end of each page |
7c10855
to
0e88356
Compare
@josephjclark fixed the git conflict |
Description
Add ability to paginate
oscar
cases. Since we are fetching cases with referrals i have limit the pagination to20 cases
per request because in each 20 cases we are making 20 request to fetch case referrals.These changes have been test using the following versions
Ref #130