Skip to content
代码片段 群组 项目
提交 cba2c437 编辑于 作者: Robert Speicher's avatar Robert Speicher
浏览文件

Move RepositoryArchiveCacheWorker to sidekiq-cron

Closes #15105
上级 7998725e
No related branches found
No related tags found
无相关合并请求
...@@ -11,7 +11,6 @@ def create ...@@ -11,7 +11,6 @@ def create
end end
def archive def archive
RepositoryArchiveCacheWorker.perform_async
headers.store(*Gitlab::Workhorse.send_git_archive(@project, params[:ref], params[:format])) headers.store(*Gitlab::Workhorse.send_git_archive(@project, params[:ref], params[:format]))
head :ok head :ok
rescue => ex rescue => ex
......
...@@ -156,6 +156,9 @@ production: &base ...@@ -156,6 +156,9 @@ production: &base
stuck_ci_builds_worker: stuck_ci_builds_worker:
cron: "0 0 * * *" cron: "0 0 * * *"
# Remove outdated repository archives
repository_archive_cache_worker:
cron: "0 * * * *"
# #
# 2. GitLab CI settings # 2. GitLab CI settings
......
...@@ -239,6 +239,9 @@ def host(url) ...@@ -239,6 +239,9 @@ def host(url)
Settings.cron_jobs['stuck_ci_builds_worker'] ||= 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']['cron'] ||= '0 0 * * *'
Settings.cron_jobs['stuck_ci_builds_worker']['job_class'] = 'StuckCiBuildsWorker' 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 @@ def handle_project_member_errors(errors) ...@@ -98,7 +98,6 @@ def handle_project_member_errors(errors)
authorize! :download_code, user_project authorize! :download_code, user_project
begin begin
RepositoryArchiveCacheWorker.perform_async
header *Gitlab::Workhorse.send_git_archive(user_project, params[:sha], params[:format]) header *Gitlab::Workhorse.send_git_archive(user_project, params[:sha], params[:format])
rescue rescue
not_found!('File') not_found!('File')
......
0% 加载中 .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册