File: worker.rb

package info (click to toggle)
ruby-gitlab-sidekiq-fetcher 0.9.0-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 204 kB
  • sloc: ruby: 760; makefile: 3
file content (15 lines) | stat: -rw-r--r-- 278 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
# frozen_string_literal: true

class RetryTestWorker
  include Sidekiq::Worker

  def perform(signal = 'KILL', wait_seconds = 1)
    Sidekiq.redis do |redis|
      redis.incr('times_has_been_run')
    end

    Process.kill(signal, Process.pid)

    sleep wait_seconds
  end
end