active analytic unit #67

Merged
glitch4347 merged 14 commits from active-analytic-unit-#66 into main 2 years ago
glitch4347 commented 2 years ago (Migrated from github.com)
Owner

closes https://github.com/hastic/hastic/issues/66

Changes

  • active field in analytic_units.db
  • serialize analytic unit config on creation
  • get_active method which returns analytic_unit -- not used because get_active_config` actually used
  • AnalyticUnitConfig::patch now also returns true as the last param if the patched config of the same type

Notes

  • when analytic unit creates, it's type set to it's id -- it's a hack: 3 different ids correspond to 3 different types
  • get_active_config has code duplication and really bad written
  • I use to much of unwrap in this PR
  • this PR overlaps with https://github.com/hastic/hastic/issues/65 -- there should be covered the usecase of proper persistance of analytic unit vs patching config
closes https://github.com/hastic/hastic/issues/66 ## Changes * `active` field in `analytic_units.db` * serialize analytic unit config on creation * `get_active` method which returns analytic_unit -- not used because get_active_config` actually used * `AnalyticUnitConfig::patch` now also returns `true` as the last param if the patched config of the same type ## Notes * when analytic unit creates, it's type set to it's id -- it's a hack: 3 different ids correspond to 3 different types * `get_active_config` has code duplication and really bad written * I use to much of `unwrap` in this PR * this PR overlaps with https://github.com/hastic/hastic/issues/65 -- there should be covered the usecase of proper persistance of analytic unit vs patching config
glitch4347 (Migrated from github.com) reviewed 2 years ago
glitch4347 (Migrated from github.com) commented 2 years ago
Owner
}

```suggestion } ```
rozetko (Migrated from github.com) approved these changes 2 years ago

Reviewers

The pull request has been merged as f1d31b9637.
Sign in to join this conversation.
Loading…
There is no content yet.