Skip to content
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

Some flows based on RSS keep firing for "new entries" while previously been handled already #1861

Open
benjaminvanrenterghem opened this issue May 5, 2024 · 2 comments

Comments

@benjaminvanrenterghem
Copy link

Hello,

Hope you all are well. I have noticed some flows based on RSS feeds keep firing as if they contain "new entries".

In my case the flow ends with a discord notification but that should be irrelevant. Worthy of mention that other RSS -> Discord flows are not being fired more than once, leading me to believe the RSS feed and how it's processed are to blame.

This occurs when the event is published, I don't think the manual firing during unpublished state (while editing) takes local state into account.

Example of such an RSS feed: https://ubuntu.com/blog/feed

Thanks

@farukaydin
Copy link
Member

@benjaminvanrenterghem thanks for the feedback.

We identify the new RSS entries based on whether the item content has changed or not. Do you think it's possible for that specific RSS feed that they re-publish the same posts but changing some attributes of them in their RSS feed.

@benjaminvanrenterghem
Copy link
Author

The flow for the following RSS feed on the right also resulted in refiring.

image

Neither have a guid or id accompanying the item, leading to a hash being generated from the JSON representation of the "raw" item in its entirety.

Perhaps there could be additional else if blocks which try to generate a hash for the link, title and description elements, or a combination thereof?
Would seem to me that that'd reduce the chances of misfiring due to an extra character having less chance of slipping through the cracks, so to speak.

const getInternalId = async (item) => {
if (item.guid) {
return typeof item.guid === 'object'
? item.guid['#text'].toString()
: item.guid.toString();
} else if (item.id) {
return typeof item.id === 'object'
? item.id['#text'].toString()
: item.id.toString();
}
return await hashItem(JSON.stringify(item));
};
const hashItem = async (value) => {
return await bcrypt.hash(value, 1);
};

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

No branches or pull requests

2 participants