From f61be433defc6c4eab1b39b67654722be05415d4 Mon Sep 17 00:00:00 2001 From: Pascal Zumkehr Date: Thu, 16 Jul 2020 09:47:16 +0200 Subject: [PATCH] Initialize env at startup to get everything right --- lib/tasks/bleib.rake | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/tasks/bleib.rake b/lib/tasks/bleib.rake index 644fe87..f268e6e 100644 --- a/lib/tasks/bleib.rake +++ b/lib/tasks/bleib.rake @@ -1,12 +1,14 @@ +# frozen_string_literal: true + namespace :bleib do desc 'Waits for database access' - task :wait_for_database do + task wait_for_database: :environment do configuration = Bleib::Configuration.from_environment Bleib::Database.new(configuration).wait_for_connection end desc 'Waits for database access and migrations' - task wait_for_migrations: [:wait_for_database, :environment] do + task wait_for_migrations: :wait_for_database do configuration = Bleib::Configuration.from_environment Bleib::Migrations.new(configuration).wait_until_done