Class: Bosh::Director::Api::TaskRemover

Inherits:
Object
  • Object
show all
Defined in:
lib/bosh/director/api/task_remover.rb

Instance Method Summary collapse

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

#removeObject



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