diff --git a/lib/tasks/homework_publishtime.rake b/lib/tasks/homework_publishtime.rake index 440c04a09..75e6a8912 100644 --- a/lib/tasks/homework_publishtime.rake +++ b/lib/tasks/homework_publishtime.rake @@ -3,6 +3,7 @@ namespace :homework_publishtime do desc "start publish homework and end homework" task :publish => :environment do + puts "--------------------------------homework_publish start" homework_commons = HomeworkCommon.where("publish_time = '#{Date.today}'") homework_commons.each do |homework| homework_detail_manual = homework.homework_detail_manual @@ -35,6 +36,7 @@ namespace :homework_publishtime do Mailer.run.homework_added(homework) end end + puts "--------------------------------homework_publish end" end task :end => :environment do diff --git a/lib/tasks/resource_publish.rake b/lib/tasks/resource_publish.rake index 2df0c6145..ee39cfcc5 100644 --- a/lib/tasks/resource_publish.rake +++ b/lib/tasks/resource_publish.rake @@ -3,9 +3,11 @@ namespace :resource_publish do desc "start publish resource" task :publish => :environment do + puts "--------------------------------resource_publish start" attachments = Attachment.where("publish_time = '#{Date.today}'") attachments.each do |attachment| attachment.update_column('is_publish', 1) end + puts "--------------------------------resource_publish end" end end \ No newline at end of file