Sha256: 70c6a32602b7ee4aa7ca916a06cf6932b20a61ad5e4df8b9bc3811c02d5edae6

Contents?: true

Size: 525 Bytes

Versions: 2

Compression:

Stored size: 525 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

2 entries across 2 versions & 1 rubygems

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