Class: Projects::UpdateStatisticsService
- Inherits:
-
BaseService
- Object
- BaseService
- Projects::UpdateStatisticsService
- Includes:
- Gitlab::Utils::StrongMemoize
- Defined in:
- app/services/projects/update_statistics_service.rb
Constant Summary collapse
- STAT_TO_CACHED_METHOD =
{ repository_size: [:size, :recent_objects_size], commit_count: :commit_count }.freeze
Instance Attribute Summary
Attributes inherited from BaseService
#current_user, #params, #project
Instance Method Summary collapse
Methods inherited from BaseService
Methods included from BaseServiceUtility
#deny_visibility_level, #event_service, #log_error, #log_info, #notification_service, #system_hook_service, #todo_service, #visibility_level
Methods included from Gitlab::Allowable
Constructor Details
This class inherits a constructor from BaseService
Instance Method Details
#execute ⇒ Object
12 13 14 15 16 17 18 19 20 21 22 |
# File 'app/services/projects/update_statistics_service.rb', line 12 def execute return unless project Gitlab::AppLogger.info("Updating statistics for project #{project.id}") expire_repository_caches expire_wiki_caches project.statistics.refresh!(only: statistics) after_execute_hook end |