Skip to content

Commit

Permalink
Formally define the different Poller states
Browse files Browse the repository at this point in the history
Poller now tracks its own state and logs warnings or errors when the
state changes in a way that could cause issues. We've opted for the
following:

  * `initial`: when no data has been fetched and we serve default data
  * `erroring`: when no data has ever been fetched
  * `stale`: when data has been fetched before but is now erroring
  * `fresh`: when fresh data has been fetched with no errors

We included n-logger and now log a warning or error for the `erroring`
or `stale` events.
  • Loading branch information
rowanmanning committed Oct 3, 2022
1 parent d0dc3fb commit 0fc68d2
Show file tree
Hide file tree
Showing 4 changed files with 207 additions and 132 deletions.
Loading

0 comments on commit 0fc68d2

Please sign in to comment.