Skip to content

Commit

Permalink
Merge pull request #19745 from carbonin/commit_the_data_directory
Browse files Browse the repository at this point in the history
Commit the data directory rather than creating it when the server starts
  • Loading branch information
Fryguy authored Jan 22, 2020
2 parents 9a80565 + 5c7dd53 commit 3229f99
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 8 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
.ruby-version
.sass-cache/
.tags
/data/
/data/*
/productization
/plugins
/vmdb/
Expand Down
7 changes: 0 additions & 7 deletions app/models/miq_server.rb
Original file line number Diff line number Diff line change
Expand Up @@ -89,12 +89,6 @@ def self.destroy_linked_events(server_id)
EventStream.where(:target_id => server_id, :target_type => "MiqServer").destroy_all
end

def self.setup_data_directory
# create root data directory
data_dir = File.join(File.expand_path(Rails.root), "data")
Dir.mkdir(data_dir) unless File.exist?(data_dir)
end

def self.pidfile
@pidfile ||= "#{Rails.root}/tmp/pids/evm.pid"
end
Expand Down Expand Up @@ -174,7 +168,6 @@ def self.start

EvmDatabase.seed_primordial

setup_data_directory
check_migrations_up_to_date
Vmdb::Settings.activate

Expand Down
Empty file added data/.gitkeep
Empty file.

0 comments on commit 3229f99

Please sign in to comment.