Sha256: d84b5205fefe7e9002fd6f7c5548a70290742e662be86aa0dcc798812cc33ae8

Contents?: true

Size: 584 Bytes

Versions: 48

Compression:

Stored size: 584 Bytes

Contents

namespace :blacklight do
  # task to clean out old, unsaved searches
  # rake blacklight:delete_old_searches[days_old]
  # example cron entry to delete searches older than 7 days at 2:00 AM every day: 
  # 0 2 * * * cd /path/to/your/app && /path/to/rake blacklight:delete_old_searches[7] RAILS_ENV=your_env
  desc "Removes entries in the searches table that are older than the number of days given."
  task :delete_old_searches, [:days_old] => [:environment] do |t, args|
    args.with_defaults(:days_old => 7)    
    Search.delete_old_searches(args[:days_old].to_i)
  end

end
  

Version data entries

48 entries across 48 versions & 1 rubygems

Version Path
blacklight-4.7.0.pre1 lib/railties/blacklight.rake
blacklight-4.6.3 lib/railties/blacklight.rake
blacklight-4.6.2 lib/railties/blacklight.rake
blacklight-4.6.1 lib/railties/blacklight.rake
blacklight-4.6.0 lib/railties/blacklight.rake
blacklight-4.5.0 lib/railties/blacklight.rake
blacklight-4.5.0.rc1 lib/railties/blacklight.rake
blacklight-4.4.2 lib/railties/blacklight.rake
blacklight-4.4.1 lib/railties/blacklight.rake
blacklight-4.4.0 lib/railties/blacklight.rake
blacklight-4.3.0 lib/railties/blacklight.rake
blacklight-4.2.2 lib/railties/blacklight.rake
blacklight-4.2.1 lib/railties/blacklight.rake
blacklight-4.2.0 lib/railties/blacklight.rake
blacklight-4.1.0 lib/railties/blacklight.rake
blacklight-4.0.1 lib/railties/blacklight.rake
blacklight-3.8.2 lib/railties/blacklight.rake
blacklight-4.0.0 lib/railties/blacklight.rake
blacklight-4.0.0.rc2 lib/railties/blacklight.rake
blacklight-4.0.0.rc1 lib/railties/blacklight.rake