diff options
author | Andrew Newdigate <andrew@gitlab.com> | 2018-11-01 18:06:25 +0000 |
---|---|---|
committer | Andrew Newdigate <andrew@gitlab.com> | 2018-11-01 18:06:25 +0000 |
commit | 04efa0b512953d90e125850146759d09fac2d9bc (patch) | |
tree | a4df23c1dff78817c4b50da879b1df96993b4189 /app/controllers/chaos_controller.rb | |
parent | 847c81b755b6b4146eb3fa3d5912f3d573739bd1 (diff) | |
download | gitlab-ce-04efa0b512953d90e125850146759d09fac2d9bc.tar.gz |
Fixing the broken build with style fixes
Diffstat (limited to 'app/controllers/chaos_controller.rb')
-rw-r--r-- | app/controllers/chaos_controller.rb | 7 |
1 files changed, 2 insertions, 5 deletions
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 |