parent
7998725e3c
commit
cba2c437e5
4 changed files with 6 additions and 2 deletions
|
@ -11,7 +11,6 @@ class Projects::RepositoriesController < Projects::ApplicationController
|
|||
end
|
||||
|
||||
def archive
|
||||
RepositoryArchiveCacheWorker.perform_async
|
||||
headers.store(*Gitlab::Workhorse.send_git_archive(@project, params[:ref], params[:format]))
|
||||
head :ok
|
||||
rescue => ex
|
||||
|
|
|
@ -156,6 +156,9 @@ production: &base
|
|||
stuck_ci_builds_worker:
|
||||
cron: "0 0 * * *"
|
||||
|
||||
# Remove outdated repository archives
|
||||
repository_archive_cache_worker:
|
||||
cron: "0 * * * *"
|
||||
|
||||
#
|
||||
# 2. GitLab CI settings
|
||||
|
|
|
@ -239,6 +239,9 @@ Settings['cron_jobs'] ||= Settingslogic.new({})
|
|||
Settings.cron_jobs['stuck_ci_builds_worker'] ||= Settingslogic.new({})
|
||||
Settings.cron_jobs['stuck_ci_builds_worker']['cron'] ||= '0 0 * * *'
|
||||
Settings.cron_jobs['stuck_ci_builds_worker']['job_class'] = 'StuckCiBuildsWorker'
|
||||
Settings.cron_jobs['repository_archive_cache_worker'] ||= Settingslogic.new({})
|
||||
Settings.cron_jobs['repository_archive_cache_worker']['cron'] ||= '0 * * * *'
|
||||
Settings.cron_jobs['repository_archive_cache_worker']['job_class'] = 'RepositoryArchiveCacheWorker'
|
||||
|
||||
|
||||
#
|
||||
|
|
|
@ -98,7 +98,6 @@ module API
|
|||
authorize! :download_code, user_project
|
||||
|
||||
begin
|
||||
RepositoryArchiveCacheWorker.perform_async
|
||||
header *Gitlab::Workhorse.send_git_archive(user_project, params[:sha], params[:format])
|
||||
rescue
|
||||
not_found!('File')
|
||||
|
|
Loading…
Reference in a new issue