Browse Source

Add Sidekiq web to project (#914)

This is only accessible when you are logged in as a support user. It is accessible at /sidekiq
pull/915/head v0.2.11
James Rose 2 years ago committed by GitHub
parent
commit
18b81a43c0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      config/initializers/sidekiq.rb
  2. 3
      config/routes.rb

2
config/initializers/sidekiq.rb

@ -1,3 +1,5 @@
require "sidekiq/web"
if Rails.env.staging? || Rails.env.production? if Rails.env.staging? || Rails.env.production?
redis_url = Configuration::PaasConfigurationService.new.redis_uris[:"dluhc-core-#{Rails.env}-redis"] redis_url = Configuration::PaasConfigurationService.new.redis_uris[:"dluhc-core-#{Rails.env}-redis"]

3
config/routes.rb

@ -1,5 +1,8 @@
# For details on the DSL available within this file, see https://guides.rubyonrails.org/routing.html # For details on the DSL available within this file, see https://guides.rubyonrails.org/routing.html
Rails.application.routes.draw do Rails.application.routes.draw do
mount_sidekiq = -> { mount Sidekiq::Web => "/sidekiq" }
authenticate(:user, :support?.to_proc, &mount_sidekiq)
devise_for :users, { devise_for :users, {
path: :account, path: :account,
controllers: { controllers: {

Loading…
Cancel
Save