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

Manually invoked currency refresh #181

Merged
merged 7 commits into from
Jun 2, 2024
Merged

Conversation

tiffany352
Copy link
Owner

@tiffany352 tiffany352 commented Jun 2, 2024

Adds currency.fetch_on_startup to the config, which when set to false behaves as if the cache_duration was infinite. This means rink will fetch the file once, and then keep reusing that file indefinitely.

Adds a --fetch-currency CLI argument, which will make rink download the latest version of the currency data and then exit. This can be put into a cron job and used together with the config option so that rink will never block on a web request at startup, without giving up currency units. Requires manual setup though.

Copy link

codecov bot commented Jun 2, 2024

Codecov Report

Attention: Patch coverage is 90.12346% with 16 lines in your changes are missing coverage. Please review.

Project coverage is 81.63%. Comparing base (6e674f0) to head (4dba69d).

Files Patch % Lines
cli/src/config.rs 90.12% 16 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #181      +/-   ##
==========================================
+ Coverage   80.81%   81.63%   +0.82%     
==========================================
  Files          42       42              
  Lines        7718     7870     +152     
==========================================
+ Hits         6237     6425     +188     
+ Misses       1481     1445      -36     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@tiffany352 tiffany352 marked this pull request as ready for review June 2, 2024 02:06
@tiffany352 tiffany352 merged commit 900b075 into master Jun 2, 2024
4 checks passed
@tiffany352 tiffany352 added this to the 0.8.1 milestone Jun 2, 2024
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

Successfully merging this pull request may close these issues.

1 participant