BigW Consortium Gitlab

admin_email_worker.rb 316 Bytes
Newer Older
Jacob Vosmaer committed
1 2
class AdminEmailWorker
  include Sidekiq::Worker
3
  include CronjobQueue
Jacob Vosmaer committed
4 5

  def perform
6 7
    repository_check_failed_count = Project.where(last_repository_check_failed: true).count
    return if repository_check_failed_count.zero?
Jacob Vosmaer committed
8

9
    RepositoryCheckMailer.notify(repository_check_failed_count).deliver_now
Jacob Vosmaer committed
10 11
  end
end