Module: Octo::OctoHooks::ClassMethods

Defined in:
lib/octonotification/octohooks.rb

Overview

Extend the methods here

Instance Method Summary collapse

Instance Method Details

#update_scheduler(opts) ⇒ Object

Updates the scheduler

Parameters:

  • opts (Hash)

    The options hash as passed



20
21
22
23
24
25
26
27
# File 'lib/octonotification/octohooks.rb', line 20

def update_scheduler(opts)
  user = opts[:user]
  recommender = Octo::Recommender.new
  arr = recommender.recommended_time(user)
  arr.each do |r|
    Resque.enqueue_at(r, Octo::Schedulers, user)
  end
end