Sha256: 22ead74b3d800ac51896bb83fb6a9370717b2ea979ffa5a019d1e09083dc16ba

Contents?: true

Size: 449 Bytes

Versions: 2

Compression:

Stored size: 449 Bytes

Contents

namespace :assets do

  desc "Move assets to new folder structure with asset's id in folder path"
  task rename: :environment do

    @connection = CloudFilesConnection.new

    Ckeditor::Picture.find_each do |asset|
      retries = 0
      begin
        TransferablePicture.new(asset, @connection.container).process
      rescue => e
        puts e.message
        retries = retries + 1
        retry unless retries > 5
      end
    end
  end

end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
georgia-0.7.8 lib/tasks/assets.rake
georgia-0.7.7 lib/tasks/assets.rake