blob: a8f66a5f041f4f282773061beaec0a9fe493ebb5 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
# 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
config[:queues] = ['default']
Sidekiq::ReliableFetch.setup_reliable_fetch!(config)
end
|