diff --git a/lib/tasks/homework_publishtime.rake b/lib/tasks/homework_publishtime.rake index 75e6a8912..df996ab9e 100644 --- a/lib/tasks/homework_publishtime.rake +++ b/lib/tasks/homework_publishtime.rake @@ -4,6 +4,7 @@ namespace :homework_publishtime do desc "start publish homework and end homework" task :publish => :environment do puts "--------------------------------homework_publish start" + Rails.logger.info("log--------------------------------homework_publish start") homework_commons = HomeworkCommon.where("publish_time = '#{Date.today}'") homework_commons.each do |homework| homework_detail_manual = homework.homework_detail_manual @@ -36,6 +37,7 @@ namespace :homework_publishtime do Mailer.run.homework_added(homework) end end + Rails.logger.info("log--------------------------------homework_publish end") puts "--------------------------------homework_publish end" end diff --git a/lib/tasks/resource_publish.rake b/lib/tasks/resource_publish.rake index ee39cfcc5..7584de4d3 100644 --- a/lib/tasks/resource_publish.rake +++ b/lib/tasks/resource_publish.rake @@ -4,10 +4,12 @@ namespace :resource_publish do desc "start publish resource" task :publish => :environment do puts "--------------------------------resource_publish start" + Rails.logger.info("log--------------------------------resource_publish start") attachments = Attachment.where("publish_time = '#{Date.today}'") attachments.each do |attachment| attachment.update_column('is_publish', 1) end + Rails.logger.info("log--------------------------------resource_publish end") puts "--------------------------------resource_publish end" end end \ No newline at end of file