Skip to content

Commit 84dfb71

Browse files
committed
Revert "Better logging"
This reverts commit 5be3091.
1 parent 5be3091 commit 84dfb71

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

src/ServiceControl.Audit/Auditing/AuditIngestion.cs

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -76,18 +76,18 @@ async Task EnsureStarted(CancellationToken cancellationToken)
7676
await startStopSemaphore.WaitAsync(cancellationToken);
7777
logger.Debug("Ensure started. Start/stop semaphore acquired");
7878

79-
if (!unitOfWorkFactory.CanIngestMore())
80-
{
81-
logger.Warn("Ensure started. Storage unable to ingest more. Ingestion will be paused");
79+
var canIngest = unitOfWorkFactory.CanIngestMore();
8280

83-
await StopAndTeardownInfrastructure(cancellationToken);
81+
logger.DebugFormat("Ensure started {0}", canIngest);
8482

85-
return;
83+
if (canIngest)
84+
{
85+
await SetUpAndStartInfrastructure(cancellationToken);
86+
}
87+
else
88+
{
89+
await StopAndTeardownInfrastructure(cancellationToken);
8690
}
87-
88-
logger.Debug("Ensure started. Storage able to ingest. Ingestion will be started");
89-
90-
await SetUpAndStartInfrastructure(cancellationToken);
9191
}
9292
catch (Exception e)
9393
{

0 commit comments

Comments
 (0)