mirror of
https://github.com/okieselbach/AutopilotMonitor.git
synced 2026-10-24 04:32:32 +00:00
renamings
This commit is contained in:
@@ -258,7 +258,7 @@ Monitoring/
|
||||
| **Health** | `GET /health`, `GET /health/detailed` |
|
||||
|
||||
**Timer Trigger:**
|
||||
- `DailyMaintenanceFunction` – Every 2 hours (`0 0 */2 * * *`): stale session detection, metrics aggregation, data cleanup
|
||||
- `MaintenanceFunction` – Every 2 hours (`0 0 */2 * * *`): stale session detection, metrics aggregation, data cleanup
|
||||
|
||||
### Key Backend Services
|
||||
|
||||
|
||||
@@ -1 +1 @@
|
||||
627
|
||||
629
|
||||
|
||||
+7
-7
@@ -6,17 +6,17 @@ using Microsoft.Extensions.Logging;
|
||||
namespace AutopilotMonitor.Functions.Functions.Admin
|
||||
{
|
||||
/// <summary>
|
||||
/// Timer-triggered Azure Function that runs daily maintenance.
|
||||
/// Timer-triggered Azure Function that runs periodic maintenance.
|
||||
/// Delegates all logic to MaintenanceService.
|
||||
/// </summary>
|
||||
public class DailyMaintenanceFunction
|
||||
public class MaintenanceFunction
|
||||
{
|
||||
private readonly MaintenanceService _maintenanceService;
|
||||
private readonly ILogger<DailyMaintenanceFunction> _logger;
|
||||
private readonly ILogger<MaintenanceFunction> _logger;
|
||||
|
||||
public DailyMaintenanceFunction(
|
||||
public MaintenanceFunction(
|
||||
MaintenanceService maintenanceService,
|
||||
ILogger<DailyMaintenanceFunction> logger)
|
||||
ILogger<MaintenanceFunction> logger)
|
||||
{
|
||||
_maintenanceService = maintenanceService;
|
||||
_logger = logger;
|
||||
@@ -28,10 +28,10 @@ namespace AutopilotMonitor.Functions.Functions.Admin
|
||||
/// Reduced from daily (2:00 UTC) to every 2 hours to catch stalled sessions faster.
|
||||
/// MarkStalledSessionsAsTimedOutAsync is idempotent (terminal states not overwritten).
|
||||
/// </summary>
|
||||
[Function("DailyMaintenance")]
|
||||
[Function("Maintenance")]
|
||||
public async Task Run([TimerTrigger("0 0 */2 * * *")] object timer)
|
||||
{
|
||||
_logger.LogInformation("DailyMaintenance timer trigger fired");
|
||||
_logger.LogInformation("Maintenance timer trigger fired");
|
||||
await _maintenanceService.RunAllAsync();
|
||||
}
|
||||
}
|
||||
@@ -225,7 +225,7 @@ namespace AutopilotMonitor.Functions.Services
|
||||
"DataRetentionCleanup",
|
||||
"Session",
|
||||
$"{sessionCount} sessions",
|
||||
"System.DailyMaintenance",
|
||||
"System.Maintenance",
|
||||
new Dictionary<string, string>
|
||||
{
|
||||
{ "SessionsDeleted", sessionCount.ToString() },
|
||||
|
||||
@@ -220,7 +220,7 @@ namespace AutopilotMonitor.Functions.Services
|
||||
"SessionTimeout",
|
||||
"Session",
|
||||
$"{sessionCount} sessions",
|
||||
"System.DailyMaintenance",
|
||||
"System.Maintenance",
|
||||
new Dictionary<string, string>
|
||||
{
|
||||
{ "SessionsTimedOut", sessionCount.ToString() },
|
||||
@@ -301,7 +301,7 @@ namespace AutopilotMonitor.Functions.Services
|
||||
tenantId,
|
||||
session.SerialNumber,
|
||||
durationHours: blockDurationHours,
|
||||
blockedByEmail: "System.DailyMaintenance",
|
||||
blockedByEmail: "System.Maintenance",
|
||||
reason: reason);
|
||||
|
||||
blockedCount++;
|
||||
@@ -314,7 +314,7 @@ namespace AutopilotMonitor.Functions.Services
|
||||
"ExcessiveDataBlock",
|
||||
"Device",
|
||||
$"{blockedCount} devices",
|
||||
"System.DailyMaintenance",
|
||||
"System.Maintenance",
|
||||
new Dictionary<string, string>
|
||||
{
|
||||
{ "DevicesBlocked", blockedCount.ToString() },
|
||||
|
||||
Reference in New Issue
Block a user