Skip to content

AppSettings, set update interval#104

Merged
infeeeee merged 3 commits intorichibrics:mainfrom
infeeeee:AppSettings3
Apr 7, 2024
Merged

AppSettings, set update interval#104
infeeeee merged 3 commits intorichibrics:mainfrom
infeeeee:AppSettings3

Conversation

@infeeeee
Copy link
Copy Markdown
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
@infeeeee infeeeee requested a review from richibrics March 23, 2024 00:42
@richibrics
Copy link
Copy Markdown
Owner

Really good management of the settings, I like it !

@infeeeee infeeeee merged commit 3e77042 into richibrics:main Apr 7, 2024
@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