app/models/agent.rb
# Given a schedule name, run `check` via `bulk_check` on all Agents with that schedule.
# This is called by bin/schedule.rb for each schedule in `SCHEDULES`.
Given a schedule name, run `check` via `bulk_check` on all Agents with that schedule.
This is called by bin/schedule.rb for each schedule in `SCHEDULES`.
Given a schedule name run ` check ` via ` bulk_check ` on all Agents with that schedule . This is called by bin / schedule . rb for each schedule in ` SCHEDULES ` .
def run_schedule(schedule)
      return if schedule == 'never'
      types = where(:schedule => schedule).group(:type).pluck(:type)
      types.each do |type|
        type.constantize.bulk_check(schedule)
      end
    end
def run_schedule ( schedule ) return if schedule == 'never' types = where ( :schedule => schedule ) . group ( :type ) . pluck ( :type ) types . each do | type | type . constantize . bulk_check ( schedule ) end end
Given a schedule name, run `check` via `bulk_check` on all Agents with that schedule.
Given a schedule name run ` check ` via ` bulk_check ` on all Agents with that schedule .
schedule