提交 cfe3cfb3 编写于 作者: A Andrew Newdigate

Adding chaos to GitLab through chaos endpoints

上级 e62168fc
# frozen_string_literal: true
class ChaosController < ActionController::Base
def sleep
duration_s = params[:duration_s] ? params[:duration_s].to_i : 30
Kernel.sleep duration_s
render text: "OK", content_type: 'text/plain'
end
end
......@@ -82,6 +82,8 @@ Rails.application.routes.draw do
draw :operations
draw :instance_statistics
get '/chaos/sleep' => 'chaos#sleep'
end
draw :api
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册