diff options
author | Jacob Vosmaer <contact@jacobvosmaer.nl> | 2015-10-20 17:11:26 +0200 |
---|---|---|
committer | Jacob Vosmaer <contact@jacobvosmaer.nl> | 2015-10-20 17:11:31 +0200 |
commit | a321404fde85fba6b09cbf1a56914f3a2ae555e4 (patch) | |
tree | 9a351a91ca41bc1f2c369418521a465d1348ff00 /app/workers | |
parent | e1fff018d754df432accb1b211c44dd046b065e1 (diff) | |
download | gitlab-ce-a321404fde85fba6b09cbf1a56914f3a2ae555e4.tar.gz |
Remove unused sidekiq worker
Diffstat (limited to 'app/workers')
-rw-r--r-- | app/workers/repository_archive_worker.rb | 43 |
1 files changed, 0 insertions, 43 deletions
diff --git a/app/workers/repository_archive_worker.rb b/app/workers/repository_archive_worker.rb deleted file mode 100644 index 021c1139568..00000000000 --- a/app/workers/repository_archive_worker.rb +++ /dev/null @@ -1,43 +0,0 @@ -class RepositoryArchiveWorker - include Sidekiq::Worker - - sidekiq_options queue: :archive_repo - - attr_accessor :project, :ref, :format - - def perform(project_id, ref, format) - @project = Project.find(project_id) - @ref, @format = ref, format.downcase - - repository = project.repository - - repository.clean_old_archives - - return unless file_path - return if archived? || archiving? - - repository.archive_repo(ref, storage_path, format) - end - - private - - def storage_path - Gitlab.config.gitlab.repository_downloads_path - end - - def file_path - @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(ref, storage_path, format) - end - - def archived? - File.exist?(file_path) - end - - def archiving? - File.exist?(pid_file_path) - end -end |