From ccc01b36ba3cd0e1f9c3a6e0201207114e3d1d41 Mon Sep 17 00:00:00 2001 From: Douwe Maan Date: Tue, 24 Mar 2015 13:24:35 +0100 Subject: Small code cleanup. --- app/workers/repository_archive_worker.rb | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) (limited to 'app/workers') diff --git a/app/workers/repository_archive_worker.rb b/app/workers/repository_archive_worker.rb index 3f4681a80f4..42ac77c588e 100644 --- a/app/workers/repository_archive_worker.rb +++ b/app/workers/repository_archive_worker.rb @@ -7,7 +7,7 @@ class RepositoryArchiveWorker def perform(project_id, ref, format) @project = Project.find(project_id) - @ref, @format = ref, format + @ref, @format = ref, format.downcase repository = project.repository @@ -15,7 +15,7 @@ class RepositoryArchiveWorker return if archived? || archiving? - repository.archive_repo(*archive_args) + repository.archive_repo(ref, storage_path, format) end private @@ -24,16 +24,12 @@ class RepositoryArchiveWorker Gitlab.config.gitlab.repository_downloads_path end - def archive_args - @archive_args ||= [ref, storage_path, format.downcase] - end - def file_path - @file_path ||= project.repository.archive_file_path(*archive_args) + @file_path ||= project.repository.archive_file_path(ref, storage_path, format) end def pid_file_path - @pid_file_path ||= project.repository.archive_pid_file_path(*archive_args) + @pid_file_path ||= project.repository.archive_pid_file_path(ref, storage_path, format) end def archived? -- cgit v1.2.3