aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/tasks/ecs_garbage_collect_anonymous_participants.rake2
-rw-r--r--lib/tasks/ecs_garbage_collect_sub_participants.rake4
2 files changed, 3 insertions, 3 deletions
diff --git a/lib/tasks/ecs_garbage_collect_anonymous_participants.rake b/lib/tasks/ecs_garbage_collect_anonymous_participants.rake
index f0c4836..50d894a 100644
--- a/lib/tasks/ecs_garbage_collect_anonymous_participants.rake
+++ b/lib/tasks/ecs_garbage_collect_anonymous_participants.rake
@@ -3,7 +3,7 @@ namespace :ecs do
task :gc_anonymous_participants => :environment do
num= Participant.find(:all, :conditions => ["(anonymous = ?) AND (ttl < ?)", true, DateTime.now.utc]).length
Participant.destroy_all(["(anonymous = ?) AND (ttl < ?)", true, DateTime.now.utc])
- txt= "Number of deleted messages: #{num}"
+ txt= "gc_anonymous_participants: Number of deleted outtimed anonymous participants: #{num}"
puts txt
RAILS_DEFAULT_LOGGER.info txt
end
diff --git a/lib/tasks/ecs_garbage_collect_sub_participants.rake b/lib/tasks/ecs_garbage_collect_sub_participants.rake
index eba5971..b20c50b 100644
--- a/lib/tasks/ecs_garbage_collect_sub_participants.rake
+++ b/lib/tasks/ecs_garbage_collect_sub_participants.rake
@@ -1,7 +1,7 @@
namespace :ecs do
desc "Delete outtimed subparticipants."
task :gc_sub_participants => :environment do
- ttl= 10.days.ago
+ ttl= 2.days.ago
num= 0
Participant.only_subparticipants.each do |p|
if p.created_at <= ttl
@@ -9,7 +9,7 @@ namespace :ecs do
num+=1
end
end
- txt= "Number of deleted subparticipants: #{num}"
+ txt= "gc_sub_participants: Number of deleted subparticipants: #{num}"
puts txt
RAILS_DEFAULT_LOGGER.info txt
end