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

Integrate inactive blog url and include logic to filter inactive feeds #462

Closed
c3ho opened this issue Dec 5, 2019 · 2 comments · Fixed by #639
Closed

Integrate inactive blog url and include logic to filter inactive feeds #462

c3ho opened this issue Dec 5, 2019 · 2 comments · Fixed by #639
Assignees
Labels
area: back-end area: redis Redis Database related

Comments

@c3ho
Copy link
Contributor

c3ho commented Dec 5, 2019

Currently we have work for the inactive blog, but we'll need smarter logic in order to filter feeds, could probably improve on this as we go.

  • We will probably need a set for inactive feeds
  • Include logic to designate the feeds that are in the feed set and inactive set
  • The intersection between feeds and inactive sets should be designated to inactive after the current 8 tries
@c3ho
Copy link
Contributor Author

c3ho commented Jan 26, 2020

This changes quite a bit of stuff, will need discussion on how we should approach this. Should we create separate functions or use parameters for existing functions to determine what they should do with the feeds?

c3ho added a commit to c3ho/telescope that referenced this issue Jan 29, 2020
@humphd
Copy link
Contributor

humphd commented Jan 30, 2020

@c3ho I think we should use a similar solution for this to what I'm suggesting in #624 (comment). Specifically, when a feed becomes "invalid" (maybe after we try it a bunch of times, it fails every time, and we give up on it), we set a key in Redis to indicate that. If the feed in question has an id of ebbb25abaa, we'd do this:

SET t:feed:ebbb25abaa:invalid "Date and Reason why this blog is being marked invalid..."

NOTE: I'm using SET here, not SETEX, since this key won't ever expire.

The value of the key can be some generated message that explains why the feed was made invalid, and when.

Whenever we process a feed, we'd check on these so-called "feed status keys" to see if a feed is invalid:

EXISTS t:feed:ebbb25abaa:invalid

If this gives back a value (1 for true), we know the invalid status is set for this feed, and can stop processing it. We can expose this on the Feed object like this:

let feed = await Feed.byId('ebbb25abaa');
let isInvalid = await feed.isInvalid();
// isInvalid is now true or false

When we remove a feed from our system, we'll also need to remove the ...:invalid keys (if they exist).

cc @Silvyre, who is working on similar code to this.

c3ho added a commit to c3ho/telescope that referenced this issue Feb 2, 2020
c3ho added a commit to c3ho/telescope that referenced this issue Feb 4, 2020
c3ho added a commit to c3ho/telescope that referenced this issue Feb 4, 2020
c3ho added a commit to c3ho/telescope that referenced this issue Feb 4, 2020
c3ho added a commit to c3ho/telescope that referenced this issue Feb 6, 2020
c3ho added a commit to c3ho/telescope that referenced this issue Feb 7, 2020
@c3ho c3ho closed this as completed in #639 Feb 7, 2020
c3ho added a commit that referenced this issue Feb 7, 2020
Fixes #462, Integrate inactive blog url and include logic to filter inactive feeds
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: back-end area: redis Redis Database related
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants