Sha256: d852787a50339de818baeab0811999104fd90341fb1ea91e9ff7fc02bcb5d708

Contents?: true

Size: 332 Bytes

Versions: 12

Compression:

Stored size: 332 Bytes

Contents

namespace :carter do
  desc "cleans up expired carts - default is 30 days old but this can be changed by entering the command line argument days=60"
  task :clear_expired_carts => :environment do
    days = (ENV['days'] || 30).to_i.days

    count = Cart.remove_carts(days)
    
    
    puts "#{count} carts deleted."
  end
  

end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
carter-0.8.1 lib/tasks/carter.rake
carter-0.8.0 lib/tasks/carter.rake
carter-0.7.2 lib/tasks/carter.rake
carter-0.7.1 lib/tasks/carter.rake
carter-0.7.0 lib/tasks/carter.rake
carter-0.6.4 lib/tasks/carter.rake
carter-0.6.3 lib/tasks/carter.rake
carter-0.6.2 lib/tasks/carter.rake
carter-0.6.1 lib/tasks/carter.rake
carter-0.6.0 lib/tasks/carter.rake
carter-0.5.6 lib/tasks/carter.rake
carter-0.5.5 lib/tasks/carter.rake