blob: f69cca96d80260f847c35bd03a9abf58426fc246 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
# 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
|