Sha256: f6f2ec1a774acf1d59ef65ec2a50b6d8c70d7a9f5ca7a5908c40aaf0a9d4c40d

Contents?: true

Size: 753 Bytes

Versions: 31

Compression:

Stored size: 753 Bytes

Contents

#!/usr/bin/env ruby

# Quiet some warnings we see when running in warning mode:
# RUBYOPT=-w bundle exec sidekiq
$TESTING = false

require_relative "../lib/sidekiq/cli"

def integrate_with_systemd
  return unless ENV["NOTIFY_SOCKET"]

  Sidekiq.configure_server do |config|
    config.logger.info "Enabling systemd notification integration"
    require "sidekiq/sd_notify"
    config.on(:startup) do
      Sidekiq::SdNotify.ready
    end
    config.on(:shutdown) do
      Sidekiq::SdNotify.stopping
    end
    Sidekiq.start_watchdog if Sidekiq::SdNotify.watchdog?
  end
end

begin
  cli = Sidekiq::CLI.instance
  cli.parse

  integrate_with_systemd

  cli.run
rescue => e
  raise e if $DEBUG
  warn e.message
  warn e.backtrace.join("\n")
  exit 1
end

Version data entries

31 entries across 31 versions & 1 rubygems

Version Path
sidekiq-7.3.7 bin/sidekiq
sidekiq-7.3.6 bin/sidekiq
sidekiq-7.3.5 bin/sidekiq
sidekiq-7.3.4 bin/sidekiq
sidekiq-7.3.3 bin/sidekiq
sidekiq-7.3.2 bin/sidekiq
sidekiq-7.3.1 bin/sidekiq
sidekiq-7.3.0 bin/sidekiq
sidekiq-7.2.4 bin/sidekiq
sidekiq-7.2.3 bin/sidekiq
sidekiq-7.2.2 bin/sidekiq
sidekiq-7.2.1 bin/sidekiq
sidekiq-7.2.0 bin/sidekiq
sidekiq-7.1.6 bin/sidekiq
sidekiq-7.1.5 bin/sidekiq
sidekiq-7.1.4 bin/sidekiq
sidekiq-7.1.3 bin/sidekiq
sidekiq-7.1.2 bin/sidekiq
sidekiq-7.1.1 bin/sidekiq
sidekiq-7.1.0 bin/sidekiq