Skip to content

Commit

Permalink
Updated kusto_spec.rb and ingestor_spec.rb
Browse files Browse the repository at this point in the history
Testing spec files
  • Loading branch information
MonishkaDas committed Sep 26, 2024
1 parent ab1f66f commit 9994da5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 2 additions & 0 deletions e2e/e2e.rb
Original file line number Diff line number Diff line change
Expand Up @@ -41,13 +41,15 @@ def initialize
database => "#{@database}"
table => "#{@table_with_mapping}"
json_mapping => "#{@mapping_name}"
max_size => 2
}
kusto {
path => "nomaptmp%{+YYYY-MM-dd-HH-mm}.txt"
cli_auth => true
ingest_url => "#{@ingest_url}"
database => "#{@database}"
table => "#{@table_without_mapping}"
max_size => 3
}
}
}
Expand Down
4 changes: 2 additions & 2 deletions lib/logstash/outputs/kusto/custom_size_based_buffer.rb
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ def <<(event)
@mutex.synchronize do
@buffer << event
if @buffer.size >= @max_size
@logger.debug("Size-based flush triggered")
@logger.debug("Size-based flush triggered after #{@max_size} was reached")
flush
end
end
Expand All @@ -47,7 +47,7 @@ def start_flusher_thread
@mutex.synchronize do
break if @shutdown
if Time.now - @last_flush_time >= @max_interval
@logger.debug("Time-based flush triggered")
@logger.debug("Time-based flush triggered after #{@max_interval} seconds")
flush
end
@flusher_condition.wait(@mutex, @max_interval) # Wait for either the interval or shutdown signal
Expand Down

0 comments on commit 9994da5

Please sign in to comment.