Class: RepositoryCheck::SingleRepositoryWorker

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

Instance Method Summary collapse

Instance Method Details

#perform(project_id) ⇒ Object


7
8
9
10
11
12
13
# File 'app/workers/repository_check/single_repository_worker.rb', line 7

def perform(project_id)
  project = Project.find(project_id)
  project.update_columns(
    last_repository_check_failed: !check(project),
    last_repository_check_at: Time.now,
  )
end