mail based rss feed aggregator
2
fork

Configure Feed

Select the types of activity you want to include in your feed.

use `rss.is_fetching_paused` in fetcher instead of looking at `repeated_failures` directly

ollie 7b7b7bd7 ad5dcb3c

+3 -5
+3 -5
src/eater/fetcher.gleam
··· 22 22 import gleam/bool 23 23 import gleam/dict 24 24 import gleam/erlang/process 25 - import gleam/float 26 25 import gleam/http 27 26 import gleam/http/request 28 27 import gleam/http/response ··· 405 404 406 405 // if we've failed to fetch the feed too many times 407 406 // stop fetching for this feed, until it gets started again 408 - case state.feed.repeated_failures { 409 - failures if failures > 10 -> failed_too_often(state) 410 - _ -> { 407 + case state.feed |> rss.is_fetching_paused() { 408 + True -> failed_too_often(state) 409 + False -> { 411 410 let reset_timer_and_continue = fn(state: State) { 412 411 // cancel old timer in case we received another CheckFeeds message that wasnt sent by the timer 413 412 // from the Ui for example ··· 481 480 woof.field("feed-url", state.feed.link |> uri.to_string()), 482 481 woof.field("feed-id", state.feed.id |> uuid.to_string()), 483 482 woof.int_field("feed-failures", state.feed.repeated_failures), 484 - woof.bool_field("failure-too-high", state.feed.repeated_failures > 10), 485 483 ]) 486 484 487 485 // tell the senders so they can message subscribed users about it