Class: Wurk::Preflight::Checks

Inherits:
Object
  • Object
show all
Defined in:
lib/wurk/preflight/checks.rb

Overview

The questions a preflight answers, each reading Redis through the Reader and writing to the Report. Run before the cutover, so a live stock fleet is normal here (Verify is the one that expects Wurk).

Constant Summary collapse

MIN_REDIS =
::Gem::Version.new('7.0.0')
DRAGONFLY_FULL_RATIO =
0.8
KNOWN_BROKEN =

Add-ons that are known not to work on Wurk, or that must be gone by cutover.

{
  'sidekiq-pro' => 'licensed gem: remove it, Wurk replaces it',
  'sidekiq-ent' => 'licensed gem: remove it, Wurk replaces it',
  'sidekiq-status' => 'untested on Wurk, and its web tab expects stock ERB rendering; prefer `track:`',
  'sidekiq-throttled' => 'patches stock fetch classes, which Wurk does not use; use Sidekiq::Limiter'
}.freeze

Instance Method Summary collapse

Constructor Details

#initialize(reader:, report:, keyspace:, owners:, sample:) ⇒ Checks

Returns a new instance of Checks.



24
25
26
27
28
29
30
# File 'lib/wurk/preflight/checks.rb', line 24

def initialize(reader:, report:, keyspace:, owners:, sample:)
  @reader = reader
  @report = report
  @keyspace = keyspace
  @owners = owners
  @sample = sample
end

Instance Method Details

#app(specs: ::Gem.loaded_specs) ⇒ Object



42
43
44
45
# File 'lib/wurk/preflight/checks.rb', line 42

def app(specs: ::Gem.loaded_specs)
  add_ons(specs)
  ignored_locks
end

#run ⇒ Object



32
33
34
35
36
37
38
39
40
# File 'lib/wurk/preflight/checks.rb', line 32

def run
  server
  processes
  scan_coverage
  private_lists
  payloads
  batches
  locks
end