Class: Bosh::Director::Api::TaskRemover
- Defined in:
- lib/bosh/director/api/task_remover.rb
Instance Method Summary collapse
-
#initialize(max_tasks, logger) ⇒ TaskRemover
constructor
A new instance of TaskRemover.
- #remove ⇒ Object
Constructor Details
#initialize(max_tasks, logger) ⇒ TaskRemover
Returns a new instance of TaskRemover.
3 4 5 6 |
# File 'lib/bosh/director/api/task_remover.rb', line 3 def initialize(max_tasks, logger) @max_tasks = max_tasks #@logger = logger end |
Instance Method Details
#remove ⇒ Object
8 9 10 11 12 13 |
# File 'lib/bosh/director/api/task_remover.rb', line 8 def remove removal_candidates_dataset.each do |task| FileUtils.rm_rf(task.output) task.destroy end end |