From 04efa0b512953d90e125850146759d09fac2d9bc Mon Sep 17 00:00:00 2001 From: Andrew Newdigate Date: Thu, 1 Nov 2018 18:06:25 +0000 Subject: Fixing the broken build with style fixes --- app/controllers/chaos_controller.rb | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'app/controllers/chaos_controller.rb') diff --git a/app/controllers/chaos_controller.rb b/app/controllers/chaos_controller.rb index 6593b748130..392814b4275 100644 --- a/app/controllers/chaos_controller.rb +++ b/app/controllers/chaos_controller.rb @@ -13,10 +13,8 @@ class ChaosController < ActionController::Base def cpuspin duration_s = params[:duration_s] ? params[:duration_s].to_i : 30 - end_time = Time.now + duration_s.seconds; - while Time.now < end_time - 10_000.times { } - end + end_time = Time.now + duration_s.seconds + 10_000.times { } while Time.now < end_time render text: "OK", content_type: 'text/plain' end @@ -41,5 +39,4 @@ class ChaosController < ActionController::Base render text: "To experience chaos, please set X-Chaos-Secret header", content_type: 'text/plain', status: 401 end end - end -- cgit v1.2.1