mirror of
https://github.com/codeninjasllc/discourse.git
synced 2024-12-24 22:42:27 -05:00
24 lines
447 B
Ruby
24 lines
447 B
Ruby
require "demon/base"
|
|
|
|
class Demon::Sidekiq < Demon::Base
|
|
|
|
def self.prefix
|
|
"sidekiq"
|
|
end
|
|
|
|
private
|
|
|
|
def after_fork
|
|
require 'sidekiq/cli'
|
|
# Reload initializer cause it needs to run after sidekiq/cli was required
|
|
load Rails.root + "config/initializers/sidekiq.rb"
|
|
cli = Sidekiq::CLI.instance
|
|
cli.parse([])
|
|
cli.run
|
|
rescue => e
|
|
STDERR.puts e.message
|
|
STDERR.puts e.backtrace.join("\n")
|
|
exit 1
|
|
end
|
|
|
|
end
|