Skip to content

Commit

Permalink
Feature/1030 sync devices between iot hub and portal (#1279)
Browse files Browse the repository at this point in the history
* add new entities

* add repositories

* create syncDevice job

* update mapper

* update device job

* resolve #1030

* fix unit test

* delete useless code

* add unit test device repository

* add test on configHandler production/development

* add test for syncDeviceJob

* Refactor SyncDevicesJob

* Add unit tests on SyncDevicesJob

* Refactor DeviceProfile.GetTags

* Change config name for sync database job refresh interval in seconds

* Change config for db sync from seconds to minutes

Co-authored-by: ben salim <salim.benahben@cgi.com>
  • Loading branch information
hocinehacherouf and Sben65 authored Sep 27, 2022
1 parent 021c811 commit bf060b4
Show file tree
Hide file tree
Showing 23 changed files with 1,569 additions and 3 deletions.
2 changes: 2 additions & 0 deletions src/AzureIoTHub.Portal.Infrastructure/ConfigHandlerBase.cs
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@ internal abstract class ConfigHandlerBase : ConfigHandler
internal const string MetricExporterRefreshIntervalKey = "Metrics:ExporterRefreshIntervalInSeconds";
internal const string MetricLoaderRefreshIntervalKey = "Metrics:LoaderRefreshIntervalInMinutes";

internal const string SyncDatabaseJobRefreshIntervalKey = "Job:SyncDatabaseJobRefreshIntervalInMinutes";

internal const string IdeasEnabledKey = "Ideas:Enabled";
internal const string IdeasUrlKey = "Ideas:Url";
internal const string IdeasAuthenticationHeaderKey = "Ideas:Authentication:Header";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ internal DevelopmentConfigHandler(IConfiguration config)

public override string PortalName => this.config[PortalNameKey];

public override int SyncDatabaseJobRefreshIntervalInMinutes => this.config.GetValue(SyncDatabaseJobRefreshIntervalKey, 5);

public override int MetricExporterRefreshIntervalInSeconds => this.config.GetValue(MetricExporterRefreshIntervalKey, 30);

public override int MetricLoaderRefreshIntervalInMinutes => this.config.GetValue(MetricLoaderRefreshIntervalKey, 10);
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit bf060b4

Please sign in to comment.