Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 9 additions & 9 deletions src/ServiceControl.Audit/Auditing/AuditIngestion.cs
Original file line number Diff line number Diff line change
Expand Up @@ -76,18 +76,18 @@ async Task EnsureStarted(CancellationToken cancellationToken)
await startStopSemaphore.WaitAsync(cancellationToken);
logger.Debug("Ensure started. Start/stop semaphore acquired");

var canIngest = unitOfWorkFactory.CanIngestMore();

logger.DebugFormat("Ensure started {0}", canIngest);

if (canIngest)
{
await SetUpAndStartInfrastructure(cancellationToken);
}
else
if (!unitOfWorkFactory.CanIngestMore())
{
logger.Warn("Ensure started. Storage unable to ingest more. Ingestion will be paused");
Comment thread
ramonsmits marked this conversation as resolved.
Outdated

await StopAndTeardownInfrastructure(cancellationToken);

return;
}

logger.Debug("Ensure started. Storage able to ingest. Ingestion will be started");

await SetUpAndStartInfrastructure(cancellationToken);
}
catch (Exception e)
{
Expand Down