gitlab-org--gitlab-foss/lib/gitlab/project_stats_refresh_conflicts_logger.rb

24 lines
733 B
Ruby

# frozen_string_literal: true
module Gitlab
class ProjectStatsRefreshConflictsLogger # rubocop:disable Gitlab/NamespacedClass
def self.warn_artifact_deletion_during_stats_refresh(project_id:, method:)
payload = Gitlab::ApplicationContext.current.merge(
message: 'Deleted artifacts undergoing refresh',
method: method,
project_id: project_id
)
Gitlab::AppLogger.warn(payload)
end
def self.warn_request_rejected_during_stats_refresh(project_id)
payload = Gitlab::ApplicationContext.current.merge(
message: 'Rejected request due to project undergoing stats refresh',
project_id: project_id
)
Gitlab::AppLogger.warn(payload)
end
end
end