mirror of
https://github.com/elastic/logstash.git
synced 2025-04-24 22:57:16 -04:00
- add messages_per_second setting (LOGSTASH-962)
This commit is contained in:
parent
ccfe133f18
commit
66386f9ce2
1 changed files with 4 additions and 0 deletions
|
@ -39,6 +39,9 @@ class LogStash::Outputs::Irc < LogStash::Outputs::Base
|
|||
# Set this to true to enable SSL.
|
||||
config :secure, :validate => :boolean, :default => false
|
||||
|
||||
# Limit the rate of messages sent to IRC in messages per second.
|
||||
config :messages_per_second, :validate => :number, :default => 0.5
|
||||
|
||||
public
|
||||
def register
|
||||
require "cinch"
|
||||
|
@ -56,6 +59,7 @@ class LogStash::Outputs::Irc < LogStash::Outputs::Base
|
|||
c.channels = @channels
|
||||
c.password = @password.value rescue nil
|
||||
c.ssl.use = @secure
|
||||
c.messages_per_second = @messages_per_second if @messages_per_second
|
||||
end
|
||||
Thread.new(@bot) do |bot|
|
||||
bot.start
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue