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- var canIngest = unitOfWorkFactory . CanIngestMore ( ) ;
80-
81- logger . DebugFormat ( "Ensure started {0}" , canIngest ) ;
82-
83- if ( canIngest )
84- {
85- await SetUpAndStartInfrastructure ( cancellationToken ) ;
86- }
87- else
79+ if ( ! unitOfWorkFactory . CanIngestMore ( ) )
8880 {
81+ logger . Warn ( "Ensure started. Storage unable to ingest more. Ingestion will be paused" ) ;
82+
8983 await StopAndTeardownInfrastructure ( cancellationToken ) ;
84+
85+ return ;
9086 }
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