Exception: ScatterGather::DependencyTimeoutError

Inherits:
StandardError
  • Object
show all
Defined in:
lib/scatter_gather/dependency_timeout_error.rb

Overview

Custom exception for when gather job exhausts attempts

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(max_attempts, dependency_statuses) ⇒ DependencyTimeoutError

Returns a new instance of DependencyTimeoutError.



7
8
9
10
11
12
13
14
15
# File 'lib/scatter_gather/dependency_timeout_error.rb', line 7

def initialize(max_attempts, dependency_statuses)
  @max_attempts = max_attempts
  @dependency_statuses = dependency_statuses
  super(<<~MSG)
    Gather failed after #{max_attempts} attempts. Dependencies:
    
    #{format_dependency_table(dependency_statuses)}
  MSG
end

Instance Attribute Details

#dependency_statusesObject (readonly)

Returns the value of attribute dependency_statuses.



5
6
7
# File 'lib/scatter_gather/dependency_timeout_error.rb', line 5

def dependency_statuses
  @dependency_statuses
end

#max_attemptsObject (readonly)

Returns the value of attribute max_attempts.



5
6
7
# File 'lib/scatter_gather/dependency_timeout_error.rb', line 5

def max_attempts
  @max_attempts
end