评测耗时问题

video_transcode
daiao 5 years ago
parent be87a6ec2f
commit 90c030926a

@ -9,7 +9,11 @@ namespace :shixuns do
if ENV['myshixun_id'].present?
myshixun = Myshixun.find(ENV['myshixun_id'])
myshixun.games.where(status: 2).each do |game|
puts "open_time: #{game.open_time.to_i}"
puts "end_time: #{game.end_time.to_i}"
puts "game_id: #{game.id}"
cost_time = game.end_time.to_i - game.open_time.to_i
puts "cost_time: #{cost_time}"
game.update_column(:cost_time, cost_time)
end
end

Loading…
Cancel
Save