diff options
-rw-r--r-- | lib/tasks/ecs_garbage_collect_anonymous_participants.rake | 2 | ||||
-rw-r--r-- | lib/tasks/ecs_garbage_collect_sub_participants.rake | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/lib/tasks/ecs_garbage_collect_anonymous_participants.rake b/lib/tasks/ecs_garbage_collect_anonymous_participants.rake index 8c87cac..ee0f5e4 100644 --- a/lib/tasks/ecs_garbage_collect_anonymous_participants.rake +++ b/lib/tasks/ecs_garbage_collect_anonymous_participants.rake @@ -22,7 +22,7 @@ namespace :ecs do ttl= ECS_CONFIG["participants"]["ttl_anonymous"] num= 0 Participant.only_anonymous.each do |p| - if p.created_at <= ttl + if p.created_at <= ttl.days.ago p.destroy num+=1 end diff --git a/lib/tasks/ecs_garbage_collect_sub_participants.rake b/lib/tasks/ecs_garbage_collect_sub_participants.rake index 046e36e..0067816 100644 --- a/lib/tasks/ecs_garbage_collect_sub_participants.rake +++ b/lib/tasks/ecs_garbage_collect_sub_participants.rake @@ -22,7 +22,7 @@ namespace :ecs do ttl= ECS_CONFIG["participants"]["ttl_sub"] num= 0 Participant.only_subparticipants.each do |p| - if p.created_at <= ttl + if p.created_at <= ttl.days.ago p.destroy num+=1 end |