-
Notifications
You must be signed in to change notification settings - Fork 253
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 date of last successfull rss parsing #582
Comments
@mirogordon is on it :) |
Is it still open? |
Yes, you can work on it :) |
@tdziurko I went through contributing, code-style importing, and initialisation related stuff. I've started looking at the code, I think I found a place where the update should be done. However, I'm not sure if the solution is correct and some questions also appeared in my head :)
public void checkForNewEntries(Blog person) {
log.info("Checking for new entries at {} by {}.", person.getRss(), person.getAuthor());
syndFeedFactory.createFor(person.getRss())
.toJavaList()
.stream()
.peek(feed -> {
log.info("For author {} found {} entries in rss feed", person.getAuthor(),
feed.getEntries().size());
feed.getEntries().forEach(post -> {
blogPostService.addOrUpdate(new RssEntryWithAuthor(person, post));
});
}).findAny().ifPresent(feed -> {
log.info("For author {} updated date last fetched to {}", person.getAuthor(),
LocalDateTime.now());
blogRepository.updateDateLastFetched(LocalDateTime.now(), person.getId());
});
}
|
Hello @malochak
|
@tdziurko You're right about the parsers part. There're tests that confirms that. So it means that I don't need to modify so much |
@tdziurko I cannot push my branch with fix
|
Please fork the repo, push to your own fork and create a pull request from there |
Thank's, you're right. I've just cloned the repo. Never contributed to open source project, thought I'm just allowed to push a branch and then create PR 🤦♂️ |
…parsed correctly
Bring back order of imports in Blog.java
Some RSS feeds are incorrect (not a valid RSS), some simply stops working over time (domain expiry, etc.) so we should be able to find such dead/invalid entries and investigate them to notify the author or disable them from the system.
So it would be nice to have a field with information when it was the last time we were able to parse given RSS feed successfully.
The text was updated successfully, but these errors were encountered: