Module: TypedDag::RebuildDag::ClassMethods

Defined in:
lib/typed_dag/rebuild_dag.rb

Instance Method Summary collapse

Instance Method Details

#rebuild_dag!(max_attempts = 100) ⇒ Object



9
10
11
12
13
14
15
16
17
18
19
# File 'lib/typed_dag/rebuild_dag.rb', line 9

def rebuild_dag!(max_attempts = 100)
  attempts = 0

  while !truncate_and_rebuild
    attempts += 1

    if attempts > max_attempts
      raise TypedDag::RebuildDag::AttemptsExceededError
    end
  end
end