diff options
author | Andrew Newdigate <andrew@gitlab.com> | 2019-07-16 23:10:44 +0300 |
---|---|---|
committer | Andrew Newdigate <andrew@gitlab.com> | 2019-07-18 20:04:12 +0300 |
commit | dc14c91d065d869b77b0ec0db47b8b36c96f15be (patch) | |
tree | ada79dc72cdb0badc101a6034c3100c8beb0dae9 /app/workers/chaos/cpu_spin_worker.rb | |
parent | f97a73fa39b48b6c3c770d609fcd9584d17221da (diff) |
Adds chaos endpoints to Sidekiq
This allows the chaos endpoints to be invoked in Sidekiq so that this
environment can be tested for resilience.
Diffstat (limited to 'app/workers/chaos/cpu_spin_worker.rb')
-rw-r--r-- | app/workers/chaos/cpu_spin_worker.rb | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/app/workers/chaos/cpu_spin_worker.rb b/app/workers/chaos/cpu_spin_worker.rb new file mode 100644 index 00000000000..43a32c3274f --- /dev/null +++ b/app/workers/chaos/cpu_spin_worker.rb @@ -0,0 +1,12 @@ +# frozen_string_literal: true + +module Chaos + class CpuSpinWorker + include ApplicationWorker + include ChaosQueue + + def perform(duration_s) + Gitlab::Chaos.cpu_spin(duration_s) + end + end +end |