File: config.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 (19 lines) | stat: -rw-r--r-- 553 bytes parent folder | download
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