aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHeiko Bernloehr <freeit@nflexpvipecs.rus.uni-stuttgart.de>2016-01-11 15:25:55 +0100
committerHeiko Bernloehr <Heiko.Bernloehr@FreeIT.de>2016-02-12 06:07:23 +0100
commit816fb71b8a5433becf6c68138a830bbc5e961d37 (patch)
tree6ff205b78a95c59b9dea70c7f1c5f64d4c9e1b59
parentd86ff35bf1d6a26f5136f1250a355bd8d1ad9e02 (diff)
downloadecs2-cc.tar.gz
ecs2-cc.zip
Change ECS garbage collections.HEADmastercc
-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