Fix error

This commit is contained in:
Wedge 2016-06-12 01:45:31 +03:00
parent 236ddb2770
commit 0f32989a1d
1 changed files with 6 additions and 5 deletions

View File

@ -3,12 +3,13 @@ class UpdateStatisticsJob < BaseActiveRecordJob
sidekiq_options :queue => :middle sidekiq_options :queue => :middle
def perform_with_ar_connection(args = {}) def perform_with_ar_connection(args = {})
defaults = {activity_at: nil, defaults = {'activity_at' => nil,
user_id: nil, 'user_id' => nil,
project_id: nil, 'project_id' => nil,
key: nil, 'key' => nil,
counter: 1} 'counter' => 1}
options = defaults.merge(args) options = defaults.merge(args)
puts options
statsd_increment(activity_at: options['activity_at'], user_id: options['user_id'], statsd_increment(activity_at: options['activity_at'], user_id: options['user_id'],
project_id: options['project_id'], key: options['key'], counter: options['counter']) project_id: options['project_id'], key: options['key'], counter: options['counter'])
end end