Skip to content

Commit 89acf09

Browse files
authored
Log daily task result directly in terminal (#571)
1 parent 60e2309 commit 89acf09

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

lib/tasks/daily.rake

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ task daily: :environment do
44
t = 1.day.ago
55
older_comments = Comment.where("created_at < ?", t)
66
newer_comments = Comment.where("created_at >= ?", t)
7-
Rails.logger.info "Deleting #{older_comments.count} comments older than #{t}"
8-
Rails.logger.info "Keeping #{newer_comments.count} comments newer than #{t}"
7+
puts "Deleting #{older_comments.count} comments older than #{t}"
8+
puts "Keeping #{newer_comments.count} comments newer than #{t}"
99
older_comments.delete_all
1010
end

0 commit comments

Comments
 (0)