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

Decrease requests to Open Exchange Rates #6

Closed
AlexWayfer opened this issue Oct 2, 2018 · 5 comments
Closed

Decrease requests to Open Exchange Rates #6

AlexWayfer opened this issue Oct 2, 2018 · 5 comments

Comments

@AlexWayfer
Copy link
Contributor

We have a high load at weekends:

image

I think value of data['timestamp'] is not updating at weekends and we try to update the whole data again and again… until there is Monday with the new timestamp.

Probably, gem should check File.mtime for stale? method.

@edlebert
Copy link
Owner

@AlexWayfer Thanks for the bug report. I'll look into it.

@edlebert
Copy link
Owner

@AlexWayfer Checking mtime isn't as simple as it sounds because the gem may not be configured to cache the results in a file. A better solution may be to record when the data was last fetched from the API rather than relying on the timestamp within the data. I'll think about it and patch it soon.

@AlexWayfer
Copy link
Contributor Author

@AlexWayfer Checking mtime isn't as simple as it sounds because the gem may not be configured to cache the results in a file. A better solution may be to record when the data was last fetched from the API rather than relying on the timestamp within the data. I'll think about it and patch it soon.

OK, I got it. I think, you're right.

@edlebert
Copy link
Owner

I updated this and release 0.4.0 which fixes the issue.

@AlexWayfer
Copy link
Contributor Author

Thank you.

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