Module: MailRunner::MadStatter

Defined in:
lib/mail_runner/stats.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.incr_stat(stat) ⇒ Object



11
12
13
14
15
16
17
18
19
20
21
22
# File 'lib/mail_runner/stats.rb', line 11

def self.incr_stat(stat)
  case stat
    ###Totals###
    when "mail delivered"
      $redis.incr("MR::mail_processed")
    when "runner launched"
      $redis.incr("MR::sessions")
    #errors
    #added_queue
    #removed_queue
  end
end

Instance Method Details

#get_stat(stat) ⇒ Object

get_stats



5
6
7
8
9
10
# File 'lib/mail_runner/stats.rb', line 5

def get_stat(stat)
  case stat
    when "session number"
      $redis.get("MR::sessions")
  end
end