1 # Copyright (C) The Arvados Authors. All rights reserved.
3 # SPDX-License-Identifier: AGPL-3.0
5 # Config must be done before we files; otherwise they
6 # won't be able to use Rails.configuration.* to initialize their
9 require 'enable_jobs_api'
11 Rails.application.configure do
13 if ENV["ARVADOS_CONFIG"] != "none" && ActiveRecord::Base.connection.tables.include?('jobs')
14 check_enable_legacy_jobs_api
16 rescue ActiveRecord::NoDatabaseError
17 # Since rails 5.2, all initializers are run by rake tasks (like db:create),
18 # see: https://github.com/rails/rails/issues/32870