moove-it/sidekiq-scheduler

View on GitHub
lib/sidekiq-scheduler/extensions/web.rb

Summary

Maintainability
A
0 mins
Test Coverage
require 'sidekiq/web' unless defined?(Sidekiq::Web)

ASSETS_PATH = File.expand_path('../../../web/assets', __dir__)

Sidekiq::Web.register(SidekiqScheduler::Web)
Sidekiq::Web.tabs['recurring_jobs'] = 'recurring-jobs'
Sidekiq::Web.locales << File.expand_path("#{File.dirname(__FILE__)}/../../../web/locales")

Sidekiq::Web.use Rack::Static, urls: ['/stylesheets-scheduler'],
                               root: ASSETS_PATH,
                               cascade: true,
                               header_rules: [[:all, { 'cache-control' => 'private, max-age=86400' }]]