Analytic unit type and meta in db #65 #72

Merged
glitch4347 merged 6 commits from analytic-unit-type-and-meta-in-db-#65 into main 2 years ago
glitch4347 commented 2 years ago (Migrated from github.com)
Owner

Closes https://github.com/hastic/hastic/issues/65

Changes

  • ramade from scratch AnlyticSerivice::patch_config: now it extracts data from db instead of Default
  • new method AnalyticUnitConfig::patch_needs_learning which replaces a bit logic of AnalyticUnitConfig::patch. AnalyticUnitConfig::patch is maybe deprecated now
  • new methods in PatchConfig and AnalyticUnitService for resolving / setting configs by it -- it's still hack where id and type_id correspond to each other

Other

  • code format

Notes

  • the code is really ugly it this point and logic of id's vs PatchConfig should be rethought
  • logic of need_learning overlaps with logic of same_type in AnalyticService::patch_config
  • it's not that update db work in blocking way
Closes https://github.com/hastic/hastic/issues/65 ## Changes * ramade from scratch `AnlyticSerivice::patch_config`: now it extracts data from db instead of `Default` * new method `AnalyticUnitConfig::patch_needs_learning` which replaces a bit logic of `AnalyticUnitConfig::patch`. `AnalyticUnitConfig::patch` is maybe deprecated now * new methods in `PatchConfig` and `AnalyticUnitService` for resolving / setting configs by it -- it's still hack where `id` and `type_id` correspond to each other ## Other * code format ## Notes * the code is really ugly it this point and logic of id's vs PatchConfig should be rethought * logic of `need_learning` overlaps with logic of `same_type` in `AnalyticService::patch_config` * it's not that update db work in blocking way
rozetko (Migrated from github.com) approved these changes 2 years ago

Reviewers

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