Class: Leeroy::Task::Stub
Constant Summary
Constants included from Helpers::Logging
Helpers::Logging::TRACE_FORMAT, Helpers::Logging::TRACE_LEVELS, Helpers::Logging::TRUNCATE_THRESHOLD
Instance Attribute Summary
Attributes included from Helpers::State
Attributes included from Helpers::Env
Attributes included from Leeroy::Task
#args, #global_options, #options
Instance Method Summary collapse
Methods inherited from Base
Methods included from Helpers::State
#dump_state, #load_state, #rotate_task_metadata, #state_from_pipe, #to_s
Methods included from Helpers::Logging
Methods included from Helpers::Env
Constructor Details
This class inherits a constructor from Leeroy::Task::Base
Instance Method Details
#perform(args = self.args, options = self.options, global_options = self.global_options) ⇒ Object
7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 |
# File 'lib/leeroy/task/stub.rb', line 7 def perform(args = self.args, = self., = self.) super begin = self.state. increment = self.[:increment].to_i logger.debug "increment: #{increment}" logger.info "old message: #{}" if .nil? = increment else = .to_i + increment end state. = logger.info "new message: #{}" dump_state rescue StandardError => e raise e end end |