From 5aab3fdb75639bfefe9e1209d028a7f8071d23df Mon Sep 17 00:00:00 2001 From: cxt Date: Sat, 15 Oct 2016 12:36:07 +0800 Subject: [PATCH] =?UTF-8?q?rake=E4=B8=AD=E5=8A=A0=E6=89=93=E5=8D=B0?= =?UTF-8?q?=E6=97=A5=E5=BF=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/tasks/homework_publishtime.rake | 2 ++ lib/tasks/resource_publish.rake | 2 ++ 2 files changed, 4 insertions(+) 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