Make dashboard change notifications async and robust

Refactored DashboardChangeNotifier and IDashboardChangeNotifier to use async notification with improved error handling and logging. Updated SqlDashboardStorage to call the new async notification method after dashboard changes, ensuring non-blocking and reliable client updates.
This commit is contained in:
OlgunR
2026-04-21 13:42:31 +02:00
parent 612d8371d3
commit 4fa3bcae3d
3 changed files with 16 additions and 7 deletions

View File

@@ -100,7 +100,7 @@ public sealed class SqlDashboardStorage : IEditableDashboardStorage
connection.Open();
command.ExecuteNonQuery();
_notifier?.NotifyChanged();
_ = _notifier?.NotifyChangedAsync();
return id;
}
@@ -122,7 +122,7 @@ public sealed class SqlDashboardStorage : IEditableDashboardStorage
throw new ArgumentException($"Dashboard '{dashboardId}' not found.");
}
_notifier?.NotifyChanged();
_ = _notifier?.NotifyChangedAsync();
}
public void DeleteDashboard(string dashboardId)
@@ -133,6 +133,6 @@ public sealed class SqlDashboardStorage : IEditableDashboardStorage
connection.Open();
command.ExecuteNonQuery();
_notifier?.NotifyChanged();
_ = _notifier?.NotifyChangedAsync();
}
}