From 8f51d8a86762bca81ca3369948f04bc145c9cf65 Mon Sep 17 00:00:00 2001 From: Martin Lensment Date: Tue, 14 Jul 2015 14:21:56 +0300 Subject: [PATCH] Fix cron logging #2539 --- app/models/invoice.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/models/invoice.rb b/app/models/invoice.rb index 271e37f2f..585a74a36 100644 --- a/app/models/invoice.rb +++ b/app/models/invoice.rb @@ -36,7 +36,7 @@ class Invoice < ActiveRecord::Base class << self def cancel_overdue_invoices - logger.info "#{Time.zone.now.utc} - Cancelling overdue invoices\n" + STDOUT << "#{Time.zone.now.utc} - Cancelling overdue invoices\n" unless Rails.env.test? cr_at = Time.zone.now - Setting.days_to_keep_overdue_invoices_active.days invoices = Invoice.unbinded.where( @@ -45,7 +45,7 @@ class Invoice < ActiveRecord::Base count = invoices.update_all(cancelled_at: Time.zone.now) - logger.info "#{Time.zone.now.utc} - Successfully cancelled #{count} overdue invoices\n" + STDOUT << "#{Time.zone.now.utc} - Successfully cancelled #{count} overdue invoices\n" unless Rails.env.test? end end