|  |  |  | @ -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.open_time.to_i - game.end_time.to_i | 
			
		
	
		
			
				
					|  |  |  |  |         puts "cost_time: #{cost_time}" | 
			
		
	
		
			
				
					|  |  |  |  |         game.update_column(:cost_time, cost_time) | 
			
		
	
		
			
				
					|  |  |  |  |       end | 
			
		
	
		
			
				
					|  |  |  |  |     end | 
			
		
	
	
		
			
				
					|  |  |  | 
 |