diff options
Diffstat (limited to 'app')
-rw-r--r-- | app/models/namespace.rb | 1 | ||||
-rw-r--r-- | app/models/project.rb | 1 | ||||
-rw-r--r-- | app/services/projects/transfer_service.rb | 3 | ||||
-rw-r--r-- | app/workers/pages_worker.rb | 4 |
4 files changed, 5 insertions, 4 deletions
diff --git a/app/models/namespace.rb b/app/models/namespace.rb index 67d8c1c2e4c..2fb2eb44aaa 100644 --- a/app/models/namespace.rb +++ b/app/models/namespace.rb @@ -130,6 +130,7 @@ class Namespace < ActiveRecord::Base end Gitlab::UploadsTransfer.new.rename_namespace(path_was, path) + Gitlab::PagesTransfer.new.rename_namespace(path_was, path) remove_exports! diff --git a/app/models/project.rb b/app/models/project.rb index a1888c089ce..e9c7108e805 100644 --- a/app/models/project.rb +++ b/app/models/project.rb @@ -961,6 +961,7 @@ class Project < ActiveRecord::Base Gitlab::AppLogger.info "Project was renamed: #{old_path_with_namespace} -> #{new_path_with_namespace}" Gitlab::UploadsTransfer.new.rename_project(path_was, path, namespace.path) + Gitlab::PagesTransfer.new.rename_project(path_was, path, namespace.path) end # Expires various caches before a project is renamed. diff --git a/app/services/projects/transfer_service.rb b/app/services/projects/transfer_service.rb index 34ec575e808..20b049b5973 100644 --- a/app/services/projects/transfer_service.rb +++ b/app/services/projects/transfer_service.rb @@ -64,6 +64,9 @@ module Projects # Move uploads Gitlab::UploadsTransfer.new.move_project(project.path, old_namespace.path, new_namespace.path) + # Move pages + Gitlab::PagesTransfer.new.move_project(project.path, old_namespace.path, new_namespace.path) + project.old_path_with_namespace = old_path SystemHooksService.new.execute_hooks_for(project, :transfer) diff --git a/app/workers/pages_worker.rb b/app/workers/pages_worker.rb index 6c6bb7ed13f..836e8d8ad9d 100644 --- a/app/workers/pages_worker.rb +++ b/app/workers/pages_worker.rb @@ -121,10 +121,6 @@ class PagesWorker @previous_public_path ||= File.join(pages_path, "public.#{SecureRandom.hex}") end - def lock_path - @lock_path ||= File.join(pages_path, 'deploy.lock') - end - def ref build.ref end |