Do not retry "git gc"

This commit is contained in:
Jacob Vosmaer 2016-03-17 11:02:11 +01:00
parent ea7d062fa6
commit 2057bc02a3
2 changed files with 11 additions and 1 deletions

View file

@ -24,7 +24,7 @@ module Projects
def execute def execute
raise LeaseTaken if !try_obtain_lease raise LeaseTaken if !try_obtain_lease
GitlabShellWorker.perform_async(:gc, @project.path_with_namespace) GitlabShellOneShotWorker.perform_async(:gc, @project.path_with_namespace)
ensure ensure
@project.update_column(:pushes_since_gc, 0) @project.update_column(:pushes_since_gc, 0)
end end

View file

@ -0,0 +1,10 @@
class GitlabShellOneShotWorker
include Sidekiq::Worker
include Gitlab::ShellAdapter
sidekiq_options queue: :gitlab_shell, retry: false
def perform(action, *arg)
gitlab_shell.send(action, *arg)
end
end