1
0
mirror of https://github.com/LaCasemate/fab-manager.git synced 2024-12-15 00:24:09 +01:00
fab-manager/app/workers/statistic_worker.rb
2022-08-29 17:34:09 +02:00

14 lines
330 B
Ruby

# frozen_string_literal: true
# Asynchronously generate the statistics for the last passed day.
# This worker is triggered every nights, see schedule.yml
class StatisticWorker
include Sidekiq::Worker
def perform
return unless Setting.get('statistics_module')
Statistics::BuilderService.generate_statistic
end
end