File tree Expand file tree Collapse file tree 1 file changed +9
-9
lines changed
src/ServiceControl.Audit/Auditing Expand file tree Collapse file tree 1 file changed +9
-9
lines changed Original file line number Diff line number Diff 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 {
You can’t perform that action at this time.
0 commit comments