1
0
mirror of https://github.com/LaCasemate/fab-manager.git synced 2024-11-29 10:24:20 +01:00
fab-manager/app/workers/training_authorization_worker.rb

14 lines
357 B
Ruby
Raw Normal View History

# frozen_string_literal: true
# This training will periodically check for trainings authorizations to revoke
class TrainingAuthorizationWorker
include Sidekiq::Worker
def perform
Training.find_each do |t|
Trainings::AuthorizationService.auto_cancel_authorizations(t)
Trainings::InvalidationService.auto_invalidate(t)
end
end
end