debian-mirror-gitlab/app/services/repositories/shell_destroy_service.rb

16 lines
466 B
Ruby
Raw Normal View History

2020-03-09 13:42:32 +05:30
# 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,
2020-07-28 23:09:34 +05:30
repository.shard,
2020-03-09 13:42:32 +05:30
removal_path)
end
end