Sha256: 59a1cf38a4faf034199022ed356c8ce4d4087881bc76843187ca7f89b2d4baa0

Contents?: true

Size: 526 Bytes

Versions: 1

Compression:

Stored size: 526 Bytes

Contents

# # frozen_string_literal: true

module Sidekiq
  module JobSignal
    module Web
      ROOT = File.expand_path("../../../../web", __FILE__)

      def self.registered(app)
        app.get "/signals" do
          render(:erb, File.read("#{ROOT}/views/signals.erb"))
        end

        app.post "/signals" do
          Sidekiq::JobSignal.quit(jid: params["quit"]) if params["quit"]
          render(:erb, File.read("#{ROOT}/views/signals.erb"))
        end
        app.tabs["Signals"] = "signals"
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
sidekiq-job-signal-0.1.2 lib/sidekiq/job_signal/web.rb