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