Class: Bosh::Director::Jobs::Helpers::BlobDeleter
- Defined in:
- lib/bosh/director/jobs/helpers/blob_deleter.rb
Instance Method Summary collapse
- #delete(blobstore_id, errors, force) ⇒ Object
-
#initialize(blobstore, logger) ⇒ BlobDeleter
constructor
A new instance of BlobDeleter.
Constructor Details
#initialize(blobstore, logger) ⇒ BlobDeleter
Returns a new instance of BlobDeleter.
5 6 7 8 |
# File 'lib/bosh/director/jobs/helpers/blob_deleter.rb', line 5 def initialize(blobstore, logger) @blobstore = blobstore @logger = logger end |
Instance Method Details
#delete(blobstore_id, errors, force) ⇒ Object
10 11 12 13 14 15 16 17 18 19 20 |
# File 'lib/bosh/director/jobs/helpers/blob_deleter.rb', line 10 def delete(blobstore_id, errors, force) begin @blobstore.delete(blobstore_id) return true rescue Exception => e @logger.warn("Could not delete blob with id '#{blobstore_id}' from blobstore: #{e}\n " + e.backtrace.join("\n")) errors << e end force end |