Class: Taskr::Actions::RotateTaskLog
Instance Attribute Summary
Attributes inherited from Base
#parameters, #task, #task_action
Instance Method Summary collapse
Methods inherited from Base
Constructor Details
This class inherits a constructor from Taskr::Actions::Base
Instance Method Details
#execute ⇒ Object
122 123 124 125 126 127 128 |
# File 'lib/taskr/actions.rb', line 122 def execute num = parameters['delete_old_log_entries_after_days'].to_i cond = ['timestamp < ?', Time.now - num.days] LogEntry.delete_all(cond) LogEntry.debug(task_action, "Deleted log entries with conditions: #{cond.inspect}") end |