Sha256: c031b4d561777c21bacd14956047efed0837f3fff79914e2b62f04018cc56106

Contents?: true

Size: 1002 Bytes

Versions: 1

Compression:

Stored size: 1002 Bytes

Contents

require 'sidekiq'
require 'sidekiq/web'
require 'will_paginate'
require 'will_paginate/view_helpers/sinatra'

require 'sidekiq/monitor/version'
require 'sidekiq/monitor/models/event'
require 'sidekiq/monitor/counters/base'
require 'sidekiq/monitor/counters/queue'
require 'sidekiq/monitor/counters/worker'
require 'sidekiq/monitor/middleware'
require 'sidekiq/monitor/railtie' if defined?(Rails)
require 'sidekiq/monitor/web/paginate_renderer'
require 'sidekiq/monitor/web'

module Sidekiq
  module Monitor
    extend self

    include ActiveSupport::Configurable

    config_accessor :events_ttl, :github_repo

    def current_revision
      @current_revision ||= begin
        `git rev-parse HEAD`.strip
      end
    end
  end
end

Sidekiq::Web.helpers  WillPaginate::Sinatra::Helpers
Sidekiq::Web.register Sidekiq::Monitor::Web
Sidekiq::Web.tabs['Monitor'] = 'monitor'

Sidekiq.configure_server do |config|
  config.server_middleware do |chain|
    chain.add Sidekiq::Monitor::Middleware
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
sidekiq-monitor-0.0.2 lib/sidekiq/monitor.rb