This PR connects the harvester with the database. Instead of storing harvested listings in CSV files, they will now be saved directly to the database. Additionally, this PR fixes a bug that previously prevented restarting of scraping unless the server was restarted.
The PR also removes manual duplication checking for listings, as this functionality is now handled by the ORM. Note: Future implementation will need to include time-based listings storage.
The listings model has been updated to include additional fields.
Type of Change
Please delete options that are not relevant.
[x] Bug fix (non-breaking change which fixes an issue)
[x] New feature (non-breaking change which adds functionality)
[x] Breaking change (fix or feature that would cause existing functionality to not work as expected)
[x] This change requires a documentation update
How Has This Been Tested?
The changes have been verified through unit tests covering both the database pipeline and the bug fixes.
[x] Unit Test
[ ] Integration Test
[ ] E2E Test
Checklist
Before submitting your pull request, please verify you have completed the following:
[x] I have read the CONTRIBUTING document.
[x] I have checked that my code adheres to the code style of this project.
[x] I have performed a self-review of my own code.
[x] I have commented my code, particularly in hard-to-understand areas.
[x] I have made corresponding changes to the documentation.
[x] My changes generate no new warnings.
[x] I have added tests that prove my fix is effective or that my feature works.
[x] New and existing unit tests pass locally with my changes.
[ ] Any dependent changes have been merged and published in downstream modules.
Additional Notes
Due to changes in the Listings model, there may be impacts on the policy module as it pulls data from the database.
Description
Issue Link: https://github.com/orgs/CodeForBc/projects/2/views/1?pane=issue&itemId=64613853&issue=CodeForBc%7Cairbnb-regulation%7C24
This PR connects the harvester with the database. Instead of storing harvested listings in CSV files, they will now be saved directly to the database. Additionally, this PR fixes a bug that previously prevented restarting of scraping unless the server was restarted.
The PR also removes manual duplication checking for listings, as this functionality is now handled by the ORM. Note: Future implementation will need to include time-based listings storage.
The listings model has been updated to include additional fields.
Type of Change
Please delete options that are not relevant.
How Has This Been Tested?
The changes have been verified through unit tests covering both the database pipeline and the bug fixes.
Checklist
Before submitting your pull request, please verify you have completed the following:
Additional Notes
Due to changes in the Listings model, there may be impacts on the policy module as it pulls data from the database.