check_system_indices_with_retries!

in lib/app/preflight_check.rb [113:128]


      def check_system_indices_with_retries!(retry_interval:, retry_timeout:)
        started_at = Time.now
        loop do
          if client.indices.exists?(:index => Utility::Constants::CONNECTORS_INDEX) && client.indices.exists?(:index => Utility::Constants::JOB_INDEX)
            Utility::Logger.info("Found system indices #{Utility::Constants::CONNECTORS_INDEX} and #{Utility::Constants::JOB_INDEX}.")
            return
          end
          Utility::Logger.warn('Required system indices for connector service don\'t exist. Make sure to run Kibana first to create system indices.')
          sleep(retry_interval)
          time_elapsed = Time.now - started_at
          if time_elapsed > retry_timeout
            fail_check!("Could not find required system indices after #{time_elapsed.to_i} seconds. Terminating...")
          end
        end
      end