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

On fetch failure the previous result is discarted #31

Open
berlincount opened this issue Mar 13, 2018 · 6 comments
Open

On fetch failure the previous result is discarted #31

berlincount opened this issue Mar 13, 2018 · 6 comments

Comments

@berlincount
Copy link

I keep seeing fetch failures (400), while the data from the previous fetch would still be current enough to display something ..

Maybe keeping the last result until the next successful fetch would make sense?

@deg0nz
Copy link
Owner

deg0nz commented Mar 13, 2018

Yes, this could make sense, but I think we would have to specify a time for which the old data is still "fresh enough" to be kept.
So we need some kind timeout time for the old data until we finally show the fetcher errors and remove the old data...

@berlincount
Copy link
Author

Well, marking it stale can be done immediately either way .. no upcoming trains known anymore is the ultimate error state ..

@deg0nz
Copy link
Owner

deg0nz commented Jun 19, 2018

I want to have this feature and I'm going to implement this at some time... Summer and the upcoming festival season cuts time for me.

So any contribution is welcome! Please feel free to make PR. :)

I'm adding the "Help wanted" label now..

@deg0nz
Copy link
Owner

deg0nz commented Mar 2, 2019

This could be nicely implemented with cached-hafas-client. This way, we could save some more data for future departures if needed...

Let's see, when the sqlite version is out and check if this is not overkill...

@deg0nz
Copy link
Owner

deg0nz commented Apr 21, 2019

So, a small update on that: cached-hafas-client seems to be perfect for the job without much effort for implementing this feature.

Although I would like to wait until the SQLite datastore is implemented, so we don't have to bother MagicMirror-users to install a Redis server on their machines. With SQLite we will probably be able to automate all this.

@berlincount
Copy link
Author

seems like the sqlite backend is available now! :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants