Permalink
Browse files

feedback for the user added

  • Loading branch information...
1 parent 1086f7d commit 920105ac8facfe691e953a54a38f9e97ff9a9882 @tompesman committed Jun 20, 2012
Showing with 4 additions and 2 deletions.
  1. +4 −2 lib/tasks/push_tasks.rake
@@ -3,7 +3,9 @@ namespace :push do
desc "Delete all push messages and feedback older than 7 days or DAYS=x if defined (where x is an integer)"
task :clean => :environment do
days = ENV["DAYS"].to_i || 7
- Push::Feedback.where("created_at < ?", days.days.ago).delete_all
- Push::Message.where("created_at < ?", days.days.ago).delete_all
+ puts "Removing #{days} days of push messages and feedback"
+ feedback = Push::Feedback.where("created_at < ?", days.days.ago).delete_all
+ messages = Push::Message.where("created_at < ?", days.days.ago).delete_all
+ puts "Done, messages=#{messages} feedback=#{feedback}"
end
end

0 comments on commit 920105a

Please sign in to comment.