Module: ProjectStatsRefreshConflictsGuard

Extended by:
ActiveSupport::Concern
Included in:
Projects::JobsController, Projects::PipelinesController
Defined in:
app/controllers/concerns/project_stats_refresh_conflicts_guard.rb

Instance Method Summary collapse

Instance Method Details

#reject_if_build_artifacts_size_refreshing!Object



6
7
8
9
10
11
12
# File 'app/controllers/concerns/project_stats_refresh_conflicts_guard.rb', line 6

def reject_if_build_artifacts_size_refreshing!
  return unless project.refreshing_build_artifacts_size?

  Gitlab::ProjectStatsRefreshConflictsLogger.warn_request_rejected_during_stats_refresh(project.id)

  render_409('Action temporarily disabled. The project this pipeline belongs to is undergoing stats refresh.')
end