Welcome to mirror list, hosted at ThFree Co, Russian Federation.

shell_destroy_service.rb « repositories « services « app - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 2f5af10e24c1ecb442ce4d1db20abc80700eec1d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
# frozen_string_literal: true

class Repositories::ShellDestroyService < Repositories::BaseService
  REPO_REMOVAL_DELAY = 5.minutes.to_i
  STALE_REMOVAL_DELAY = REPO_REMOVAL_DELAY * 2

  def execute(delay = REPO_REMOVAL_DELAY)
    return success unless repository

    GitlabShellWorker.perform_in(delay,
                                 :remove_repository,
                                 repository_storage,
                                 removal_path)
  end
end