Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2015-04-02 23:30:55 +0300
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2015-04-02 23:30:55 +0300
commit424cbf46d5d84e604a8404bb0af67a99fe21d337 (patch)
tree094de5dfc3d6088a336beb5b3309e2dd2df00986 /lib
parentf8f9750323b47d6d9d3c65936a4dfe87fe0c2a60 (diff)
parent85b29f99f0c0bc8cad71d323b744c740d8be7ce0 (diff)
Merge branch 'repository-archive-worker' into 'master'
Archive repositories in background worker. Depends on https://gitlab.com/gitlab-org/gitlab_git/merge_requests/17 being merged, a new `gitlab_git` being released and this MR's `Gemfile.lock` being updated.. See private issue https://dev.gitlab.org/gitlab/gitlabhq/issues/2173. To do after this is merged: Update https://gitlab.com/gitlab-org/omnibus-gitlab/blob/master/files/gitlab-cookbooks/gitlab/templates/default/sv-sidekiq-run.erb in omnibus. See merge request !436
Diffstat (limited to 'lib')
-rw-r--r--lib/api/repositories.rb11
1 files changed, 6 insertions, 5 deletions
diff --git a/lib/api/repositories.rb b/lib/api/repositories.rb
index b259914a01c..1fbf3dca3c6 100644
--- a/lib/api/repositories.rb
+++ b/lib/api/repositories.rb
@@ -133,10 +133,11 @@ module API
authorize! :download_code, user_project
begin
- file_path = ArchiveRepositoryService.new.execute(
- user_project,
- params[:sha],
- params[:format])
+ file_path = ArchiveRepositoryService.new(
+ user_project,
+ params[:sha],
+ params[:format]
+ ).execute
rescue
not_found!('File')
end
@@ -149,7 +150,7 @@ module API
env['api.format'] = :binary
present data
else
- not_found!('File')
+ redirect request.fullpath
end
end