mirror of
https://github.com/azaion/satellite-provider.git
synced 2026-04-22 12:56:37 +00:00
cleanup
This commit is contained in:
@@ -47,13 +47,9 @@ public class RegionProcessingService : BackgroundService
|
||||
if (workerId > 1)
|
||||
{
|
||||
var startupDelay = Random.Shared.Next(100, 500);
|
||||
_logger.LogInformation("Region worker {WorkerId} starting with {Delay}ms delay to reduce contention",
|
||||
workerId, startupDelay);
|
||||
await Task.Delay(startupDelay, stoppingToken);
|
||||
}
|
||||
|
||||
_logger.LogInformation("Region worker {WorkerId} started", workerId);
|
||||
|
||||
while (!stoppingToken.IsCancellationRequested)
|
||||
{
|
||||
try
|
||||
@@ -62,13 +58,7 @@ public class RegionProcessingService : BackgroundService
|
||||
|
||||
if (request != null)
|
||||
{
|
||||
_logger.LogInformation("Worker {WorkerId}: Dequeued region request {RegionId}",
|
||||
workerId, request.Id);
|
||||
|
||||
await _regionService.ProcessRegionAsync(request.Id, stoppingToken);
|
||||
|
||||
_logger.LogInformation("Worker {WorkerId}: Completed region {RegionId}",
|
||||
workerId, request.Id);
|
||||
}
|
||||
}
|
||||
catch (OperationCanceledException)
|
||||
@@ -80,8 +70,6 @@ public class RegionProcessingService : BackgroundService
|
||||
_logger.LogError(ex, "Worker {WorkerId}: Error processing region request", workerId);
|
||||
}
|
||||
}
|
||||
|
||||
_logger.LogInformation("Region worker {WorkerId} stopped", workerId);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user