diff options
author | Jacob Vosmaer <contact@jacobvosmaer.nl> | 2016-03-17 11:02:11 +0100 |
---|---|---|
committer | Jacob Vosmaer <contact@jacobvosmaer.nl> | 2016-03-17 11:02:11 +0100 |
commit | 2057bc02a31a20765e165b503b877350e892908b (patch) | |
tree | 87655ea8b9a12368062bd7096258aedf8265a666 | |
parent | ea7d062fa60e3e622288237fc66a815348bbcf36 (diff) | |
download | gitlab-ce-2057bc02a31a20765e165b503b877350e892908b.tar.gz |
Do not retry "git gc"
-rw-r--r-- | app/services/projects/housekeeping_service.rb | 2 | ||||
-rw-r--r-- | app/workers/gitlab_shell_one_shot_worker.rb | 10 |
2 files changed, 11 insertions, 1 deletions
diff --git a/app/services/projects/housekeeping_service.rb b/app/services/projects/housekeeping_service.rb index bccd67d3dbf..a0973c5d260 100644 --- a/app/services/projects/housekeeping_service.rb +++ b/app/services/projects/housekeeping_service.rb @@ -24,7 +24,7 @@ module Projects def execute raise LeaseTaken if !try_obtain_lease - GitlabShellWorker.perform_async(:gc, @project.path_with_namespace) + GitlabShellOneShotWorker.perform_async(:gc, @project.path_with_namespace) ensure @project.update_column(:pushes_since_gc, 0) end diff --git a/app/workers/gitlab_shell_one_shot_worker.rb b/app/workers/gitlab_shell_one_shot_worker.rb new file mode 100644 index 00000000000..4ddbcf574d5 --- /dev/null +++ b/app/workers/gitlab_shell_one_shot_worker.rb @@ -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 |