class Octo::NotificationHit

Counters for notifications sent

Public Class Methods

fakedata(args) click to toggle source
# File lib/octocore-cassandra/models/enterprise/notification_hit.rb, line 25
def self.fakedata(args)
  opts = {
    bod: false,
    step: 1.day
  }
  self.time_slots.concat([:ios, :android]).inject([]) do |res, uid|
    values = {
        count: rand(500..900),
      }
    _args = args.merge(uid: uid)
    res << self.fake_data_with(_args, values, opts)
    res.flatten
  end
end
time_slots() click to toggle source
# File lib/octocore-cassandra/models/enterprise/notification_hit.rb, line 21
def self.time_slots
  Array.new(6) { |i| "s_#{ i }" }
end