Module: SidekiqPublisher::ReportUnpublishedCount
- Defined in:
- lib/sidekiq_publisher/report_unpublished_count.rb
Class Method Summary collapse
Class Method Details
.call(instrumenter: Instrumenter.new) ⇒ Object
8 9 10 11 12 13 14 |
# File 'lib/sidekiq_publisher/report_unpublished_count.rb', line 8 def self.call(instrumenter: Instrumenter.new) instrumenter.instrument("unpublished.reporter", unpublished_count: SidekiqPublisher::Job.unpublished.count) rescue ActiveRecord::StatementInvalid, PG::UnableToSend, PG::ConnectionBad => e ActiveRecord::Base.clear_active_connections! if db_connection_error?(e) raise end |