Class: GithubHookWorker

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

Instance Method Summary collapse

Instance Method Details

#perform(github_id, sender_id) ⇒ Object



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

def perform(github_id, sender_id)
  github_repository = GithubRepository.find_by_github_id(github_id)
  user = User.find_by_uid(sender_id)
  if user.present? && github_repository.present?
    github_repository.download_manifests(user.token)
    github_repository.update_all_info_async(user.token)
  end
end