Sha256: 4a545da8b950d355f679b1d296e585201d1997f1b203a067f6a20210bf106d81

Contents?: true

Size: 839 Bytes

Versions: 15

Compression:

Stored size: 839 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|
    Sidekiq.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
  if Sidekiq.error_handlers.length == 0
    warn e.message
    warn e.backtrace.join("\n")
  else
    cli.handle_exception e
  end

  exit 1
end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
sidekiq-6.5.12 bin/sidekiq
sidekiq-6.5.11 bin/sidekiq
sidekiq-6.5.10 bin/sidekiq
sidekiq-6.5.9 bin/sidekiq
sidekiq-6.5.8 bin/sidekiq
sidekiq-6.5.7 bin/sidekiq
sidekiq-6.5.6 bin/sidekiq
sidekiq-6.5.5 bin/sidekiq
sidekiq-6.5.4 bin/sidekiq
sidekiq-6.5.3 bin/sidekiq
sidekiq-6.5.2 bin/sidekiq
sidekiq-6.5.1 bin/sidekiq
sidekiq-6.5.0 bin/sidekiq
sidekiq-6.4.2 bin/sidekiq
sidekiq-6.4.1 bin/sidekiq