Class: AdminEmailWorker

Inherits:
Object
  • Object
show all
Includes:
Sidekiq::Worker
Defined in:
app/workers/admin_email_worker.rb

Instance Method Summary collapse

Instance Method Details

#performObject


6
7
8
9
10
11
# File 'app/workers/admin_email_worker.rb', line 6

def perform
  repository_check_failed_count = Project.where(last_repository_check_failed: true).count
  return if repository_check_failed_count.zero?

  RepositoryCheckMailer.notify(repository_check_failed_count).deliver_now
end