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