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

AppSettings, set update interval #104

Merged
merged 3 commits into from
Apr 7, 2024
Merged

Conversation

infeeeee
Copy link
Collaborator

@infeeeee infeeeee commented Mar 23, 2024

  • Part 4 of App settings again #90 separation
  • New class next to Warehouses and Entities: Settings
  • Currently only one type of settings available: AppSettings, and there two option:
    • Change the update interval
    • Change the retry interval after connection to broker is lost. Useful to increment for laptops, where losing connection is expected.
  • SettingsManager is a Singleton, where Settings' configs stored.
  • You can get the settings from the Settings Classes itself, it's not necessary to call SettingsManager directly, this is the basic pattern how config values can be returned:
from IoTuring.Settings.Deployments.AppSettings.AppSettings import AppSettings, CONFIG_KEY_UPDATE_INTERVAL

self.updateTimeout = int(AppSettings.GetFromSettingsConfigurations(CONFIG_KEY_UPDATE_INTERVAL))

Closes #5

@infeeeee infeeeee mentioned this pull request Mar 23, 2024
5 tasks
@richibrics
Copy link
Owner

Really good management of the settings, I like it !

@infeeeee infeeeee merged commit 3e77042 into richibrics:main Apr 7, 2024
1 check passed
@infeeeee infeeeee deleted the AppSettings3 branch May 3, 2024 19:49
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.

make send-interval configurable via the configuration menu
2 participants