-
Notifications
You must be signed in to change notification settings - Fork 43
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
PIMS-2002 Properties Export #2641
Conversation
🚀 Deployment Information The Express API Image has been built with the tag: |
Code Climate has analyzed commit ac9cc3e and detected 0 issues on this pull request. The test coverage on the diff in this pull request is 100.0% (50% is the threshold). This pull request will bring the total coverage in the repository to 93.6%. View more on Code Climate. |
🚀 Deployment Information The React APP Image has been built with the tag: |
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.
Seems to work well, downloaded all 11736 properties in about 1.5 seconds compared to 7.75 seconds using the TypeORM joins.
Also, the PIDs are nicely formatted with hyphens in the excel, and the sensitive column is also there.
🎯 Summary
PIMS-2002
This is in response to the timeout issue sometimes happening when exporting the properties in a live environment.
Pretty sure the clause that slows things down is this:
where: { Id: In(buildingIds) }
When it is called getting parcels and buildings.
Suspect this is an issue with how TypeORM handles its queries. Almost looks like it's going a circular query at one point.
Changes
Testing
It's hard to know if this will save time in OpenShift, where the issue seems to be.
Locally, you can test that the download works by exporting the properties table.
Test it doesn't work by stopping the API and hitting the download button again.
🔰 Checklist