debian-mirror-gitlab/vendor/gems/sidekiq-reliable-fetch/tests/interruption/config.rb

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

20 lines
553 B
Ruby
Raw Normal View History

2023-06-20 00:43:36 +05:30
# frozen_string_literal: true
require_relative '../../lib/sidekiq-reliable-fetch'
require_relative 'worker'
TEST_CLEANUP_INTERVAL = 20
TEST_LEASE_INTERVAL = 5
Sidekiq.configure_server do |config|
config[:semi_reliable_fetch] = true
# We need to override these parameters to not wait too long
# The default values are good for production use only
# These will be ignored for :basic
config[:cleanup_interval] = TEST_CLEANUP_INTERVAL
config[:lease_interval] = TEST_LEASE_INTERVAL
Sidekiq::ReliableFetch.setup_reliable_fetch!(config)
end