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

Add interest rates #69

Merged
merged 17 commits into from Jan 2, 2024
Merged

Add interest rates #69

merged 17 commits into from Jan 2, 2024

Conversation

zefir-git
Copy link
Member

@zefir-git zefir-git commented Dec 28, 2023

This PR implements interest payments.

A configurable percentage can be added or removed on all accounts at a configurable interval.

Caution

If the server or plugin is rebooted/reloaded in the same minute interest payments are made, then they will be repeated. This is normally very unlikely.

To avoid scheduling reboots at the same time as interest payments, you can calculate when interest payments are run using this formula:

currentMinutes % interval == 0

Where currentMinutes is Unix time (Wikipedia) but in minutes (divided by 60). And interval is the interval you have set in the config.

@zefir-git zefir-git added the feature New features label Dec 28, 2023
@zefir-git zefir-git self-assigned this Dec 28, 2023
@zefir-git zefir-git linked an issue Dec 28, 2023 that may be closed by this pull request
@zefir-git zefir-git changed the title 42 account interest rate Add interest rates Dec 30, 2023
@zefir-git zefir-git marked this pull request as ready for review December 30, 2023 05:56
@zefir-git zefir-git requested review from km127pl and removed request for km127pl December 30, 2023 05:56
@zefir-git zefir-git marked this pull request as draft December 30, 2023 05:58
@zefir-git zefir-git marked this pull request as ready for review January 2, 2024 13:45
@Dviih Dviih self-requested a review January 2, 2024 18:02
Copy link
Member

@Dviih Dviih left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems good to me

@zefir-git zefir-git merged commit b534504 into master Jan 2, 2024
@zefir-git zefir-git deleted the 42-account-interest-rate branch January 2, 2024 20:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New features
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Account interest rate
2 participants