debian-mirror-gitlab/app/workers/users/create_statistics_worker.rb

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

23 lines
586 B
Ruby
Raw Normal View History

2020-04-22 19:07:51 +05:30
# frozen_string_literal: true
module Users
class CreateStatisticsWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker
2021-06-08 01:23:25 +05:30
2021-10-27 15:23:28 +05:30
data_consistency :always
2020-04-22 19:07:51 +05:30
# rubocop:disable Scalability/CronWorkerContext
# This worker does not perform work scoped to a context
include CronjobQueue
# rubocop:enable Scalability/CronWorkerContext
feature_category :users
def perform
UsersStatistics.create_current_stats!
rescue ActiveRecord::RecordInvalid => exception
Gitlab::ErrorTracking.track_exception(exception)
end
end
end