diff options
| author | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2013-08-12 18:21:47 +0300 |
|---|---|---|
| committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2013-08-12 18:21:47 +0300 |
| commit | 7ecebdd02df9b11fa6ba4f8033dcfe097935ed66 (patch) | |
| tree | a080ef380992f880b7b29714772152dc3ac71ed5 /app/contexts | |
| parent | e2f946fddb7caf9757b33ba3dc7de8634f4ee825 (diff) | |
| download | gitlab-ce-7ecebdd02df9b11fa6ba4f8033dcfe097935ed66.tar.gz | |
Repository import during project creation often return timeout for medium and large repos.
So lets do it async. First create project, then import repo and create
satellite with Sidekiq
Diffstat (limited to 'app/contexts')
| -rw-r--r-- | app/contexts/projects/create_context.rb | 14 |
1 files changed, 0 insertions, 14 deletions
diff --git a/app/contexts/projects/create_context.rb b/app/contexts/projects/create_context.rb index aee3c1c566c..64c2785302d 100644 --- a/app/contexts/projects/create_context.rb +++ b/app/contexts/projects/create_context.rb @@ -45,20 +45,6 @@ module Projects @project.creator = current_user - # Import project from cloneable resource - if @project.valid? && @project.import_url.present? - shell = Gitlab::Shell.new - - if shell.import_repository(@project.path_with_namespace, @project.import_url) - # We should create satellite for imported repo - @project.satellite.create unless @project.satellite.exists? - @project.imported = true - true - else - @project.errors.add(:import_url, 'cannot clone repo') - end - end - if @project.save unless @project.group @project.users_projects.create(project_access: UsersProject::MASTER, user: current_user) |
