Skip to content

Commit

Permalink
Prevent sending metrics when RabbitMQ is not configured
Browse files Browse the repository at this point in the history
  • Loading branch information
eduardoj committed Oct 30, 2020
1 parent 2b6c66a commit 484fb48
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/api/app/jobs/measurements_job.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ class MeasurementsJob < ApplicationJob
queue_as :quick

def perform
return unless CONFIG['amqp_options']

RabbitmqBus.send_to_bus('metrics', "group count=#{Group.count}")
RabbitmqBus.send_to_bus('metrics', "user in_beta=#{User.in_beta.count},in_rollout=#{User.in_rollout.count},count=#{User.count},#{role_fields},#{state_fields}")
end
Expand Down

0 comments on commit 484fb48

Please sign in to comment.