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

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

module Ci
  class DeleteStoredArtifactsWorker
    include ApplicationWorker

    def perform(project_id, store_path, file_store, size)
      Project.find_by_id(project_id).try do |project|
        Ci::DeleteStoredArtifactsService.new(project).execute(store_path, file_store)

        UpdateProjectStatistics.update_project_statistics!(project, :build_artifacts_size, -size)
      end
    end
  end
end