Do not retry "git gc"
This commit is contained in:
parent
ea7d062fa6
commit
2057bc02a3
2 changed files with 11 additions and 1 deletions
|
@ -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
|
||||||
|
|
10
app/workers/gitlab_shell_one_shot_worker.rb
Normal file
10
app/workers/gitlab_shell_one_shot_worker.rb
Normal 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
|
Loading…
Reference in a new issue