
Otherwise, the rake task might fail if the database connection could not be established (e.g. when creating a new database).
9 lines
325 B
Ruby
9 lines
325 B
Ruby
DockerClient.initialize_environment unless Rails.env.test? && `which docker`.blank?
|
|
|
|
if !Rake.application.top_level_tasks.to_s.include?('db:') &&
|
|
ApplicationRecord.connection.tables.present? &&
|
|
DockerContainerPool.config[:active]
|
|
DockerContainerPool.start_refill_task
|
|
at_exit { DockerContainerPool.clean_up }
|
|
end
|