Class: LogStash::Filters::Jdbc::LoaderSchedule

Inherits:
Validatable
  • Object
show all
Defined in:
lib/logstash/filters/jdbc/loader_schedule.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Validatable

find_validation_errors, #formatted_errors, #initialize, #valid?

Constructor Details

This class inherits a constructor from LogStash::Filters::Jdbc::Validatable

Instance Attribute Details

#loader_scheduleObject (readonly)

Returns the value of attribute loader_schedule.



7
8
9
# File 'lib/logstash/filters/jdbc/loader_schedule.rb', line 7

def loader_schedule
  @loader_schedule
end

#schedule_frequencyObject (readonly)

Returns the value of attribute schedule_frequency.



7
8
9
# File 'lib/logstash/filters/jdbc/loader_schedule.rb', line 7

def schedule_frequency
  @schedule_frequency
end

Instance Method Details

#to_log_stringObject



9
10
11
12
13
14
15
16
17
18
19
20
# File 'lib/logstash/filters/jdbc/loader_schedule.rb', line 9

def to_log_string
  message = ""
  message.concat "these months in the year [#{@cronline.months.to_a.join(", ")}];" unless @cronline.months.nil?
  message.concat "these days in the month [#{@cronline.days.to_a.join(", ")}];" unless @cronline.days.nil?
  message.concat "these hours in the day [#{@cronline.hours.to_a.join(", ")}];" unless @cronline.hours.nil?
  message.concat "these minutes in the hour [#{@cronline.minutes.to_a.join(", ")}];" unless @cronline.minutes.nil?
  message.concat "these seconds in the minute [#{@cronline.seconds.to_a.join(", ")}]" unless @cronline.seconds.nil?
  if !message.empty?
    message.prepend "Scheduled for: "
  end
  message
end