rake 任务

dev_oauth
jingquan huang 6 years ago
parent d642728588
commit 1acd53d7c8

@ -42,7 +42,7 @@ namespace :public_course do
begin
CourseMember.create!(course_id: course_id, user_id: user_id, role: 4)
rescue Exception => e
Rails.logger()
Rails.logger(e.message)
end
end
end
@ -69,6 +69,7 @@ namespace :public_course do
when 1
# 讨论区
created_on = random_time start_time, end_time
puts created_on
messages = Message.where(board_id: course.boards)
messages.each do |message|
message.update_columns(created_on: created_on, updated_on: created_on)
@ -134,4 +135,3 @@ namespace :public_course do
large_time
end
end

Loading…
Cancel
Save