Skip to content

Conversation

@MerlinZhang
Copy link
Contributor

New Feature

Keeps track of when sources were most recently harvested.
A new database model called LastHarvest keeps records of each source and the most recent date when it was harvested. The database is updated every time a new document from a more recent date is normalized.
Code updates include a new view and url to view the database information for most recently updated sources.

Included LastHarvest model to keep track of most recently harvested metadata for each scrapi source
Added new serializer for LastHarvest model
Added new url to display database information for most recent harvests, sorted by source
Created view to display most recent harvest information as a list of json objects
Added method last_harvested() to update LastHarvest database when more recent metadata is harvested
Included method call in process_normalized to only store recent updates when the metadata is normalized
@@ -0,0 +1,29 @@
# from api.webview.models import Document

Choose a reason for hiding this comment

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

This file needs to be removed from the git repository.

@jeffreyliu3230
Copy link

Can you add tests to this feature? We normally would require tests to be implemented for every new feature.

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