Merge branch 'ensure_cache_clear_after_db_migrate' into 'master'

Ensure cache clear runs after db:migrations.

Fixes #959 

Long explanation on how and why is starting with comment in https://gitlab.com/gitlab-org/omnibus-gitlab/issues/959#note_3170934

See merge request !598
This commit is contained in:
Marin Jankovski 2016-01-12 14:43:16 +00:00
commit b4dfb1f7b4
2 changed files with 1 additions and 6 deletions

View File

@ -26,6 +26,7 @@ define :migrate_database, :command => nil, :action => :run, :restarts => [] do
exit ${PIPESTATUS[0]}
EOH
action params[:action]
notifies :run, "execute[clear the #{params[:name]} cache]", :immediately unless OmnibusHelper.not_listening?("redis")
params[:restarts].each do |svc|
notifies :restart, svc, :immediately
end

View File

@ -42,9 +42,3 @@ migrate_database 'gitlab-rails' do
action :nothing
restarts dependent_services
end
migrate_database 'gitlab-ci' do
command '/opt/gitlab/bin/gitlab-ci-rake db:migrate'
action :nothing
restarts ci_dependent_services
end