13996: Move configuration load earlier, before database setup
[arvados.git] / services / api / config / initializers / legacy_jobs_api.rb
index 2faf0dac4b6be6777b12b0990aaffb0605a5848a..8f3b3cb5f8e951df55979a1f74adce8b847de652 100644 (file)
@@ -9,11 +9,7 @@
 require 'enable_jobs_api'
 
 Server::Application.configure do
-  begin
-    if ActiveRecord::Base.connection.tables.include?('jobs')
-      check_enable_legacy_jobs_api
-    end
-  rescue ActiveRecord::NoDatabaseError
-    # Database hasn't been created yet
+  if ActiveRecord::Base.connection.tables.include?('jobs')
+    check_enable_legacy_jobs_api
   end
 end