2019-07-16 16:10:44 -04:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
|
|
|
module Chaos
|
2020-02-19 13:09:10 -05:00
|
|
|
class SleepWorker # rubocop:disable Scalability/IdempotentWorker
|
2019-07-16 16:10:44 -04:00
|
|
|
include ApplicationWorker
|
2021-04-30 14:10:09 -04:00
|
|
|
|
2021-07-21 08:09:35 -04:00
|
|
|
data_consistency :always
|
|
|
|
|
2021-04-30 14:10:09 -04:00
|
|
|
sidekiq_options retry: 3
|
2019-07-16 16:10:44 -04:00
|
|
|
include ChaosQueue
|
|
|
|
|
|
|
|
def perform(duration_s)
|
|
|
|
Gitlab::Chaos.sleep(duration_s)
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|